[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200507094237.13599-1-weiyongjun1@huawei.com>
Date: Thu, 7 May 2020 09:42:37 +0000
From: Wei Yongjun <weiyongjun1@...wei.com>
To: Samuel Iglesias Gonsalvez <siglesias@...lia.com>,
Jens Taprogge <jens.taprogge@...rogge.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Zhouyang Jia <jiazhouyang09@...il.com>,
"Kees Cook" <keescook@...omium.org>
CC: Wei Yongjun <weiyongjun1@...wei.com>,
<industrypack-devel@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
Hulk Robot <hulkci@...wei.com>
Subject: [PATCH -next] ipack: tpci200: fix error return code in tpci200_register()
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@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/ipack/carriers/tpci200.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ipack/carriers/tpci200.c b/drivers/ipack/carriers/tpci200.c
index 8a9c169..b5eec18 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;
}
Powered by blists - more mailing lists