mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Wei Yongjun'" <weiyj.lk@gmail.com>,
	"'Andrew Morton'" <akpm@linux-foundation.org>
Cc: "'Rafael J. Wysocki'" <rjw@sisk.pl>,
	"'Jens Axboe'" <axboe@kernel.dk>,
	yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org,
	"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH -next] mg_disk: fix error return code in mg_probe()
Date: Thu, 28 Mar 2013 13:43:56 +0900	[thread overview]
Message-ID: <000501ce2b6e$db4963e0$91dc2ba0$%han@samsung.com> (raw)
In-Reply-To: <CAPgLHd87a0=e8pX4YRwpxzxk1=YgcVimjxTFnpJKH8wRs1WfjQ@mail.gmail.com>

On Thursday, March 28, 2013 1:32 PM, Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

CC'ed Jens Axboe

It looks good.
Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  drivers/block/mg_disk.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
> index 532bb89..a56cfcd 100644
> --- a/drivers/block/mg_disk.c
> +++ b/drivers/block/mg_disk.c
> @@ -892,8 +892,10 @@ static int mg_probe(struct platform_device *plat_dev)
>  	gpio_direction_output(host->rst, 1);
> 
>  	/* reset out pin */
> -	if (!(prv_data->dev_attr & MG_DEV_MASK))
> +	if (!(prv_data->dev_attr & MG_DEV_MASK)) {
> +		err = -EINVAL;
>  		goto probe_err_3a;
> +	}
> 
>  	if (prv_data->dev_attr != MG_BOOT_DEV) {
>  		rsc = platform_get_resource_byname(plat_dev, IORESOURCE_IO,


  reply	other threads:[~2013-03-28  4:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28  4:31 Wei Yongjun
2013-03-28  4:43 ` Jingoo Han [this message]
2013-03-28 15:44   ` Jens Axboe

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='000501ce2b6e$db4963e0$91dc2ba0$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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

Powered by JetHome