From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Hemant Kumar <hemantk@codeaurora.org>,
Jeffrey Hugo <jhugo@codeaurora.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Siddartha Mohanadoss <smohanad@codeaurora.org>,
Sujeev Dias <sdias@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] bus: mhi: core: Fix a NULL vs IS_ERR check in mhi_create_devices()
Date: Tue, 7 Apr 2020 16:16:51 +0530 [thread overview]
Message-ID: <20200407104651.GE2442@Mani-XPS-13-9360> (raw)
In-Reply-To: <20200407093133.GM68494@mwanda>
On Tue, Apr 07, 2020 at 12:31:33PM +0300, Dan Carpenter wrote:
> The mhi_alloc_device() function never returns NULL, it returns error
> pointers.
>
> Fixes: da1c4f856924 ("bus: mhi: core: Add support for creating and destroying MHI devices")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thanks Dan!
Regards,
Mani
> ---
> drivers/bus/mhi/core/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c
> index eb4256b81406..55928feea0c9 100644
> --- a/drivers/bus/mhi/core/main.c
> +++ b/drivers/bus/mhi/core/main.c
> @@ -294,7 +294,7 @@ void mhi_create_devices(struct mhi_controller *mhi_cntrl)
> !(mhi_chan->ee_mask & BIT(mhi_cntrl->ee)))
> continue;
> mhi_dev = mhi_alloc_device(mhi_cntrl);
> - if (!mhi_dev)
> + if (IS_ERR(mhi_dev))
> return;
>
> mhi_dev->dev_type = MHI_DEVICE_XFER;
> --
> 2.25.1
>
prev parent reply other threads:[~2020-04-07 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 9:31 Dan Carpenter
2020-04-07 10:46 ` Manivannan Sadhasivam [this message]
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=20200407104651.GE2442@Mani-XPS-13-9360 \
--to=manivannan.sadhasivam@linaro.org \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=hemantk@codeaurora.org \
--cc=jhugo@codeaurora.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®