stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] greybus: svc: fix an error handling bug in gb_svc_hello()
       [not found] <20220202113347.1288-1-johan@kernel.org>
@ 2022-02-02 11:33 ` Johan Hovold
  0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2022-02-02 11:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Johan Hovold, Alex Elder, Mitchell Tasman, Dan Carpenter,
	greybus-dev, linux-kernel, stable

From: Dan Carpenter <dan.carpenter@oracle.com>

Cleanup if gb_svc_queue_deferred_request() fails.

Fixes: ee2f2074fdb2 ("greybus: svc: reconfig APBridgeA-Switch link to handle required load")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220202072016.GA6748@kili
Cc: stable@vger.kernel.org      # 4.9
[johan: fix commit summary prefix and rename label ]
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/greybus/svc.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
index ce7740ef449b..51d0875a3480 100644
--- 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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-02 11:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220202113347.1288-1-johan@kernel.org>
2022-02-02 11:33 ` [PATCH 1/3] greybus: svc: fix an error handling bug in gb_svc_hello() Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).