[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200608231211.3363633-183-sashal@kernel.org>
Date: Mon, 8 Jun 2020 19:05:08 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Wei Yongjun <weiyongjun1@...wei.com>,
Hulk Robot <hulkci@...wei.com>,
Samuel Iglesias Gonsalvez <siglesias@...lia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
industrypack-devel@...ts.sourceforge.net
Subject: [PATCH AUTOSEL 5.6 183/606] ipack: tpci200: fix error return code in tpci200_register()
From: Wei Yongjun <weiyongjun1@...wei.com>
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@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
Cc: stable <stable@...r.kernel.org>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@...lia.com>
Link: https://lore.kernel.org/r/20200507094237.13599-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
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 23445ebfda5c..ec71063fff76 100644
--- a/drivers/ipack/carriers/tpci200.c
+++ b/drivers/ipack/carriers/tpci200.c
@@ -306,6 +306,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;
}
--
2.25.1
Powered by blists - more mailing lists