mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Zhang Changzhong <zhangchangzhong@huawei.com>,
	Stuart Yoder <stuyoder@gmail.com>, Alexander Graf <agraf@suse.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: fsl-mc: fix error return code in fsl_mc_object_allocate()
Date: Fri, 4 Dec 2020 12:44:20 +0200	[thread overview]
Message-ID: <b395e683-9ac1-55d1-319f-69a47d83d2aa@nxp.com> (raw)
In-Reply-To: <1607068967-31991-1-git-send-email-zhangchangzhong@huawei.com>



On 12/4/2020 10:02 AM, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 197f4d6a4a00 ("staging: fsl-mc: fsl-mc object allocator driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>

Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>

---
Best Regards, Laurentiu

> ---
>  drivers/bus/fsl-mc/fsl-mc-allocator.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> index e71a6f5..2d7c764 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c
> +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> @@ -292,8 +292,10 @@ int __must_check fsl_mc_object_allocate(struct fsl_mc_device *mc_dev,
>  		goto error;
>  
>  	mc_adev = resource->data;
> -	if (!mc_adev)
> +	if (!mc_adev) {
> +		error = -EINVAL;
>  		goto error;
> +	}
>  
>  	mc_adev->consumer_link = device_link_add(&mc_dev->dev,
>  						 &mc_adev->dev,
> 

      reply	other threads:[~2020-12-04 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  8:02 Zhang Changzhong
2020-12-04 10:44 ` Laurentiu Tudor [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=b395e683-9ac1-55d1-319f-69a47d83d2aa@nxp.com \
    --to=laurentiu.tudor@nxp.com \
    --cc=agraf@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuyoder@gmail.com \
    --cc=zhangchangzhong@huawei.com \
    /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®