svc: add missed destroy_workqueue when gb_svc_create fails
PATCH 1/1 svc: add missed destroy_workqueue when gb_svc_create fails
destroy_workqueue() should be called to destroy svc->wq when gb_svc_create() init resources fails.
Fixes 8465def499c7 ("staging: greybus: move the greybus core to drivers/greybus")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Li Heng <[email protected]>
--- drivers/greybus/svc.c | 1 + 1 file changed, 1 insertion(+)
drivers/greybus/svc.c +1 -0
@@ -1340,6 +1340,7 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd) err_put_device:put_device (&svc->dev); +destroy_workqueue (svc->wq);return NULL ; }
Signature · 1 line
2.7.4
Johan Hovold
maintainerQuoted 15 lines · Li Heng
destroy_workqueue()should be called to destroysvc->wqwhengb_svc_create()init resources fails.Fixes 8465def499c7 ("staging: greybus: move the greybus core to drivers/greybus")Reported-by Hulk Robot <[email protected]>Signed-off-by Li Heng <[email protected]>--- drivers/greybus/svc.c | 1 + 1 file changed, 1 insertion(+)drivers/greybus/svc.c +0
-0
drivers/greybus/svc.c struct gb_svc *gb_svc_create(struct gb_host_device *hd) · line 1343
Quoted 4 lines
drivers/greybus/svc.c +1
-0@@ -1340,6 +1340,7 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd) err_put_device:put_device (&svc->dev); +destroy_workqueue (svc->wq);
Your bot is broken; the workqueue is released in gb_svc_release().
And please fix your internal review process so that you catch things like this before posting.
drivers/greybus/svc.c struct gb_svc *gb_svc_create(struct gb_host_device *hd) · line 1345
Quoted 2 lines
drivers/greybus/svc.c +0
-0return NULL ; }
Johan