diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-30 13:23:53 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-11-08 09:10:29 -0700 |
commit | 1762b57fcbe365c2e3f79769a7fe77942ea3165f (patch) | |
tree | 1dcd52b99331a109a3fdde23155d37acd57c5690 /drivers/block/skd_main.c | |
parent | ef0899410ff630b2e75306da49996dbbfa318165 (diff) | |
download | blackbird-op-linux-1762b57fcbe365c2e3f79769a7fe77942ea3165f.tar.gz blackbird-op-linux-1762b57fcbe365c2e3f79769a7fe77942ea3165f.zip |
skd: fix error return code in skd_pci_probe()
Fix to return -ENOMEM in the skd construct error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r-- | drivers/block/skd_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index ab17bff6b4f9..1a8717fce41d 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -5321,8 +5321,10 @@ static int skd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } skdev = skd_construct(pdev); - if (skdev == NULL) + if (skdev == NULL) { + rc = -ENOMEM; goto err_out_regions; + } skd_pci_info(skdev, pci_str); pr_info("(%s): %s 64bit\n", skd_name(skdev), pci_str); |