From: Wei Yongjun <weiyongjun1@huawei.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Hemant Kumar <hemantk@codeaurora.org>,
Jeffrey Hugo <jhugo@codeaurora.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Sujeev Dias <sdias@codeaurora.org>,
Siddartha Mohanadoss <smohanad@codeaurora.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
<linux-arm-msm@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] bus: mhi: core: Fix some error return code
Date: Sat, 9 May 2020 07:56:54 +0000 [thread overview]
Message-ID: <20200509075654.175002-1-weiyongjun1@huawei.com> (raw)
Fix to return negative error code from the error handling case
instead of 0 in mhi_init_dev_ctxt() and mhi_driver_probe().
Fixes: 3000f85b8f47 ("bus: mhi: core: Add support for basic PM operations")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/bus/mhi/core/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index eb2ab058a01d..1f8c82603179 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -291,6 +291,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl)
}
/* Setup cmd context */
+ ret = -ENOMEM;
mhi_ctxt->cmd_ctxt = mhi_alloc_coherent(mhi_cntrl,
sizeof(*mhi_ctxt->cmd_ctxt) *
NR_OF_CMD_RINGS,
@@ -1100,6 +1101,7 @@ static int mhi_driver_probe(struct device *dev)
}
}
+ ret = -EINVAL;
if (dl_chan) {
/*
* If channel supports LPM notifications then status_cb should
next reply other threads:[~2020-05-09 7:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 7:56 Wei Yongjun [this message]
2020-05-11 10:31 ` [PATCH -next] bus: mhi: core: Fix some error return code Manivannan Sadhasivam
2020-05-11 14:26 ` AW: " Walter Harms
2020-05-11 14:56 ` Manivannan Sadhasivam
2020-05-11 18:43 ` Dan Carpenter
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=20200509075654.175002-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=hemantk@codeaurora.org \
--cc=hulkci@huawei.com \
--cc=jhugo@codeaurora.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=sdias@codeaurora.org \
--cc=smohanad@codeaurora.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