From: Dinh Nguyen <dinguyen@xxxxxxxxxx> This patch fixes this sparse warning: drivers/usb/dwc2/platform.c:168:25: warning: incorrect type in argument 1 (different address spaces) drivers/usb/dwc2/platform.c:168:25: expected void const *ptr drivers/usb/dwc2/platform.c:168:25: got void [noderef] <asn:2>*regs drivers/usb/dwc2/platform.c:169:37: warning: incorrect type in argument 1 (different address spaces) drivers/usb/dwc2/platform.c:169:37: expected void const *ptr drivers/usb/dwc2/platform.c:169:37: got void [noderef] <asn:2>*regs Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxx> --- drivers/usb/dwc2/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index a10e7a3..443c321 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -165,8 +165,8 @@ static int dwc2_driver_probe(struct platform_device *dev) res = platform_get_resource(dev, IORESOURCE_MEM, 0); hsotg->regs = devm_ioremap_resource(&dev->dev, res); - if (IS_ERR(hsotg->regs)) - return PTR_ERR(hsotg->regs); + if (!hsotg->regs) + return -ENOMEM; dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", (unsigned long)res->start, hsotg->regs); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html