projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ab004d
)
greybus: svc: fix an error handling bug in gb_svc_hello()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 2 Feb 2022 11:33:45 +0000
(12:33 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 4 Feb 2022 14:27:44 +0000
(15:27 +0100)
Cleanup if gb_svc_queue_deferred_request() fails.
Link:
https://lore.kernel.org/r/20220202072016.GA6748@kili
Fixes: ee2f2074fdb2 ("greybus: svc: reconfig APBridgeA-Switch link to handle required load")
Cc: stable@vger.kernel.org # 4.9
[johan: fix commit summary prefix and rename label ]
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link:
https://lore.kernel.org/r/20220202113347.1288-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/greybus/svc.c
patch
|
blob
|
history
diff --git
a/drivers/greybus/svc.c
b/drivers/greybus/svc.c
index ce7740ef449babaf0f7bfd1afd2021cb6c7a7aec..51d0875a34800aec4ea11347060e4d1956443aba 100644
(file)
--- a/
drivers/greybus/svc.c
+++ b/
drivers/greybus/svc.c
@@
-866,8
+866,14
@@
static int gb_svc_hello(struct gb_operation *op)
gb_svc_debugfs_init(svc);
- return gb_svc_queue_deferred_request(op);
+ ret = gb_svc_queue_deferred_request(op);
+ if (ret)
+ goto err_remove_debugfs;
+
+ return 0;
+err_remove_debugfs:
+ gb_svc_debugfs_exit(svc);
err_unregister_device:
gb_svc_watchdog_destroy(svc);
device_del(&svc->dev);