diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 118a938776bd9eec7a79372a915c3498f7610103..273db0beb2b88ffeb588307ce08b2cb40120c790 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1547,8 +1547,10 @@ static int atmel_spi_probe(struct platform_device *pdev) as->pdev = pdev; as->regs = devm_ioremap_resource(&pdev->dev, regs); - if (!as->regs) + if (IS_ERR(as->regs)) { + ret = PTR_ERR(as->regs); goto out_free_buffer; + } as->phybase = regs->start; as->irq = irq; as->clk = clk;