diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 3c09cbb70b1dc01e45f1d6f4fdb93d7e351ad880..c208238b890a9509bd1779f4fa6db397e7402346 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c @@ -159,11 +159,9 @@ static int ssc_probe(struct platform_device *pdev) return -ENXIO; } - ssc->regs = devm_request_and_ioremap(&pdev->dev, regs); - if (!ssc->regs) { - dev_dbg(&pdev->dev, "ioremap failed\n"); - return -EINVAL; - } + ssc->regs = devm_ioremap_resource(&pdev->dev, regs); + if (IS_ERR(ssc->regs)) + return PTR_ERR(ssc->regs); ssc->phybase = regs->start;