Search Linux Wireless

[PATCH] slimbus: ngd: simplify error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simplify error handling; we already know mwq is NULL.

Signed-off-by: Pavel Machek (CIP) <pavel@xxxxxxx>

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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux