Message ID | 1410477134-5556-1-git-send-email-weiyj_lk@163.com |
---|---|
State | Not Applicable, archived |
Headers | show |
On Fri, Sep 12, 2014 at 8:12 AM, <weiyj_lk@163.com> wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > In case of error, the function devm_ioremap_nocache() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value check > should be replaced with NULL test. > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Sep 12, 2014 at 1:12 AM, <weiyj_lk@163.com> wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > In case of error, the function devm_ioremap_nocache() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value check > should be replaced with NULL test. > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Patch applied with Alex's Review tag. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c index e25ba14..cf751f5 100644 --- a/drivers/gpio/gpio-xgene.c +++ b/drivers/gpio/gpio-xgene.c @@ -182,8 +182,8 @@ static int xgene_gpio_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); gpio->base = devm_ioremap_nocache(&pdev->dev, res->start, resource_size(res)); - if (IS_ERR(gpio->base)) { - err = PTR_ERR(gpio->base); + if (!gpio->base) { + err = -ENOMEM; goto err; }