Skip to contentSkip to conversation

ipack: tpci200: fix error return code in tpci200_register()

PATCH In review Wei Yongjun 3 participants 3 messages May 7, 2020 – May 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/ipack/carriers/tpci200.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ipack/carriers/tpci200.c +1 -0
index 8a9c169..b5eec18 100644
@@ -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;
 	}
 
Acked-by on v1 1/1
#1 lore raw

Hello Wei,

Thanks for the patch!

Patch is,

Greg, Would you mind picking this patch series through your char-misc tree?

Thanks!

Sam

Quoted 29 lines · Wei Yongjun

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")
---
 drivers/ipack/carriers/tpci200.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ipack/carriers/tpci200.c +1 -0
index 8a9c169..b5eec18 100644
@@ -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;

}