From: Pavel Machek <pavel@ucw.cz>
To: amitkarwar@gmail.com, ganapathi.bhat@nxp.com,
huxinming820@gmail.com, kvalo@codeaurora.org,
davem@davemloft.net, kuba@kernel.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: [PATCH] slimbus: ngd: simplify error handling
Date: Fri, 24 Jul 2020 15:06:58 +0200 [thread overview]
Message-ID: <20200724130658.GA29458@duo.ucw.cz> (raw)
[-- 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 --]
next reply other threads:[~2020-07-24 13:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 13:06 Pavel Machek [this message]
2020-07-24 13:14 ` [PATCH] slimbus: ngd: simplify error handling Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200724130658.GA29458@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=amitkarwar@gmail.com \
--cc=davem@davemloft.net \
--cc=ganapathi.bhat@nxp.com \
--cc=huxinming820@gmail.com \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).