lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Mar 2013 13:43:56 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Wei Yongjun' <weiyj.lk@...il.com>,
	'Andrew Morton' <akpm@...ux-foundation.org>
Cc:	"'Rafael J. Wysocki'" <rjw@...k.pl>,
	'Jens Axboe' <axboe@...nel.dk>, yongjun_wei@...ndmicro.com.cn,
	linux-kernel@...r.kernel.org, 'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH -next] mg_disk: fix error return code in mg_probe()

On Thursday, March 28, 2013 1:32 PM, Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@...ndmicro.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@...ndmicro.com.cn>

CC'ed Jens Axboe

It looks good.
Reviewed-by: Jingoo Han <jg1.han@...sung.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,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ