linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slimbus: ngd: simplify error handling
@ 2020-07-24 13:06 Pavel Machek
  2020-07-24 13:14 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2020-07-24 13:06 UTC (permalink / raw)
  To: amitkarwar, ganapathi.bhat, huxinming820, kvalo, davem, kuba,
	linux-wireless, netdev, linux-kernel, trivial

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

Simplify error handling; we already know mwq is NULL.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 743ee7b4e63f..3def0c782c7f 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1396,17 +1396,11 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev)
 	ctrl->mwq = create_singlethread_workqueue("ngd_master");
 	if (!ctrl->mwq) {
 		dev_err(&pdev->dev, "Failed to start master worker\n");
-		ret = -ENOMEM;
-		goto wq_err;
+		qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
+		return -ENOMEM;
 	}
 
 	return 0;
-wq_err:
-	qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
-	if (ctrl->mwq)
-		destroy_workqueue(ctrl->mwq);
-
-	return ret;
 }
 
 static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-24 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 13:06 [PATCH] slimbus: ngd: simplify error handling Pavel Machek
2020-07-24 13:14 ` Kalle Valo

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).