Message ID | 20170208072310.GA12877@mwanda (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Wed, Feb 8, 2017 at 9:23 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote: > devm_ioremap() returns NULL on error. It doesn't return error pointers. > > Fixes: 8b1bd11c1f8f ("pinctrl: samsung: Add the support the multiple IORESOURCE_MEM for one pin-bank") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Fix already sent by Wei: https://www.spinics.net/lists/arm-kernel/msg560747.html Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index d79eadad6c5f..35b9d400d5c6 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -990,7 +990,7 @@ samsung_pinctrl_get_soc_data(struct samsung_pinctrl_drv_data *d, res = platform_get_resource(pdev, IORESOURCE_MEM, i); virt_base[i] = devm_ioremap(&pdev->dev, res->start, resource_size(res)); - if (IS_ERR(virt_base[i])) + if (!virt_base[i]) return ERR_PTR(-EIO); }
devm_ioremap() returns NULL on error. It doesn't return error pointers. Fixes: 8b1bd11c1f8f ("pinctrl: samsung: Add the support the multiple IORESOURCE_MEM for one pin-bank") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html