diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-28 09:43:43 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-28 09:43:43 -0600 |
commit | c613c5f686b5493290aeb6a3c4b3b2371a8582cf (patch) | |
tree | 230209f4ab9f65a3de43bed7b4c4d5b267815f05 /drivers/block | |
parent | 80b00df291684850b5659ec95fb1fd2acbd2c0ec (diff) | |
download | blackbird-op-linux-c613c5f686b5493290aeb6a3c4b3b2371a8582cf.tar.gz blackbird-op-linux-c613c5f686b5493290aeb6a3c4b3b2371a8582cf.zip |
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')
-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) 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, |