diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-28 11:43:43 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-28 11:43:43 -0400 |
commit | c613c5f686b5493290aeb6a3c4b3b2371a8582cf (patch) | |
tree | 230209f4ab9f65a3de43bed7b4c4d5b267815f05 /drivers/block/mg_disk.c | |
parent | 80b00df291684850b5659ec95fb1fd2acbd2c0ec (diff) |
mg_disk: fix error return code in mg_probe()
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>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/mg_disk.c')
-rw-r--r-- | drivers/block/mg_disk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index 1788f491e0fb..076ae7f1b781 100644 --- a/drivers/block/mg_disk.c +++ b/drivers/block/mg_disk.c | |||
@@ -890,8 +890,10 @@ static int mg_probe(struct platform_device *plat_dev) | |||
890 | gpio_direction_output(host->rst, 1); | 890 | gpio_direction_output(host->rst, 1); |
891 | 891 | ||
892 | /* reset out pin */ | 892 | /* reset out pin */ |
893 | if (!(prv_data->dev_attr & MG_DEV_MASK)) | 893 | if (!(prv_data->dev_attr & MG_DEV_MASK)) { |
894 | err = -EINVAL; | ||
894 | goto probe_err_3a; | 895 | goto probe_err_3a; |
896 | } | ||
895 | 897 | ||
896 | if (prv_data->dev_attr != MG_BOOT_DEV) { | 898 | if (prv_data->dev_attr != MG_BOOT_DEV) { |
897 | rsc = platform_get_resource_byname(plat_dev, IORESOURCE_IO, | 899 | rsc = platform_get_resource_byname(plat_dev, IORESOURCE_IO, |