aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/transport_class.h
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@collabora.com>2020-01-06 13:58:16 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2020-01-15 22:55:37 -0500
commitcd7ea70bb00aac8f7ab1b0635edc669e12f53891 (patch)
tree6c25bbfce78677254849f1dc52bd4f506d9b8b64 /include/linux/transport_class.h
parentscsi: drivers: base: Support atomic version of attribute_container_device_trigger (diff)
downloadwireguard-linux-cd7ea70bb00aac8f7ab1b0635edc669e12f53891.tar.xz
wireguard-linux-cd7ea70bb00aac8f7ab1b0635edc669e12f53891.zip
scsi: drivers: base: Propagate errors through the transport component
The transport registration may fail. Make sure the errors are propagated to the callers. Link: https://lore.kernel.org/r/20200106185817.640331-3-krisman@collabora.com Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux/transport_class.h')
-rw-r--r--include/linux/transport_class.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h
index a9c59761927b..63076fb835e3 100644
--- a/include/linux/transport_class.h
+++ b/include/linux/transport_class.h
@@ -62,16 +62,16 @@ struct transport_container {
container_of(x, struct transport_container, ac)
void transport_remove_device(struct device *);
-void transport_add_device(struct device *);
+int transport_add_device(struct device *);
void transport_setup_device(struct device *);
void transport_configure_device(struct device *);
void transport_destroy_device(struct device *);
-static inline void
+static inline int
transport_register_device(struct device *dev)
{
transport_setup_device(dev);
- transport_add_device(dev);
+ return transport_add_device(dev);
}
static inline void