History

scsi: drivers: base: Propagate errors through the transport component

The transport registration may fail. Make sure the errors are propagated to the callers.

Gabriel Krisman Bertazi committed 6 years ago

Commit cd7ea701 parent 7c1ef332 files · +11 −6Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/transport_class.h+3−3
@@ -62,16 +62,16 @@ struct transport_container { · 61 unmodified lines
6262 container_of(x, struct transport_container, ac)
6363
6464 void transport_remove_device(struct device *);
65−void transport_add_device(struct device *);
65+int transport_add_device(struct device *);
6666 void transport_setup_device(struct device *);
6767 void transport_configure_device(struct device *);
6868 void transport_destroy_device(struct device *);
6969
70−static inline void
70+static inline int
7171 transport_register_device(struct device *dev)
7272 {
7373 transport_setup_device(dev);
74− transport_add_device(dev);
74+ return transport_add_device(dev);
7575 }
7676
7777 static inline void