Re: [PATCH -next] mg_disk: fix error return code in mg_probe()

2013-03-28 Thread Jens Axboe
On Thu, Mar 28 2013, Jingoo Han wrote:
> On Thursday, March 28, 2013 1:32 PM, Wei Yongjun wrote:
> > 
> > From: Wei Yongjun 
> > 
> > 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 
> 
> CC'ed Jens Axboe
> 
> It looks good.
> Reviewed-by: Jingoo Han 

Applied, thanks guys.

-- 
Jens Axboe

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


Re: [PATCH -next] mg_disk: fix error return code in mg_probe()

2013-03-28 Thread Jens Axboe
On Thu, Mar 28 2013, Jingoo Han wrote:
 On Thursday, March 28, 2013 1:32 PM, Wei Yongjun wrote:
  
  From: Wei Yongjun yongjun_...@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_...@trendmicro.com.cn
 
 CC'ed Jens Axboe
 
 It looks good.
 Reviewed-by: Jingoo Han jg1@samsung.com

Applied, thanks guys.

-- 
Jens Axboe

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


Re: [PATCH -next] mg_disk: fix error return code in mg_probe()

2013-03-27 Thread Jingoo Han
On Thursday, March 28, 2013 1:32 PM, Wei Yongjun wrote:
> 
> From: Wei Yongjun 
> 
> 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 

CC'ed Jens Axboe

It looks good.
Reviewed-by: Jingoo Han 

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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH -next] mg_disk: fix error return code in mg_probe()

2013-03-27 Thread Wei Yongjun
From: Wei Yongjun 

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 
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH -next] mg_disk: fix error return code in mg_probe()

2013-03-27 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@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_...@trendmicro.com.cn
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH -next] mg_disk: fix error return code in mg_probe()

2013-03-27 Thread Jingoo Han
On Thursday, March 28, 2013 1:32 PM, Wei Yongjun wrote:
 
 From: Wei Yongjun yongjun_...@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_...@trendmicro.com.cn

CC'ed Jens Axboe

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

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