Re: [PATCH -next] ipack: tpci200: fix error return code in tpci200_register()
On Thu, May 07, 2020 at 04:34:06PM +0200, Samuel Iglesias Gonsálvez wrote: > Hello Wei, > > Thanks for the patch! > > Patch is, > > Acked-by: Samuel Iglesias Gonsalvez > > Greg, Would you mind picking this patch series through your char-misc > tree? Sure, will do. greg k-h
Re: [PATCH -next] ipack: tpci200: fix error return code in tpci200_register()
Hello Wei, Thanks for the patch! Patch is, Acked-by: Samuel Iglesias Gonsalvez Greg, Would you mind picking this patch series through your char-misc tree? Thanks! Sam On Thu, 2020-05-07 at 09:42 +, Wei Yongjun wrote: > 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 > Signed-off-by: Wei Yongjun > --- > 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; > } > > > > signature.asc Description: This is a digitally signed message part
[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 Signed-off-by: Wei Yongjun --- 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; }