diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2020-05-07 12:42:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-27 18:37:43 +0300 |
commit | a851990732c596d0f25d2f7c3dc6c8690efaac7e (patch) | |
tree | 6c36733ea25a608718abbc01d4cf86cf568245dc | |
parent | 77433aa4cd86ce1a10983649bb18415b8c31afe6 (diff) | |
download | linux-a851990732c596d0f25d2f7c3dc6c8690efaac7e.tar.xz |
ipack: tpci200: fix error return code in tpci200_register()
commit 133317479f0324f6faaf797c4f5f3e9b1b36ce35 upstream.
Fix to return negative error code -ENOMEM from the ioremap() error handling
case instead of 0, as done elsewhere in this function.
Fixes: 43986798fd50 ("ipack: add error handling for ioremap_nocache")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Link: https://lore.kernel.org/r/20200507094237.13599-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/ipack/carriers/tpci200.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ipack/carriers/tpci200.c b/drivers/ipack/carriers/tpci200.c index 8a9c169b6f99..b5eec18ad59a 100644 --- a/drivers/ipack/carriers/tpci200.c +++ b/drivers/ipack/carriers/tpci200.c @@ -309,6 +309,7 @@ static int tpci200_register(struct tpci200_board *tpci200) "(bn 0x%X, sn 0x%X) failed to map driver user space!", tpci200->info->pdev->bus->number, tpci200->info->pdev->devfn); + res = -ENOMEM; goto out_release_mem8_space; } |