Message ID | 1430359614.2531.1.camel@ingics.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b2b3024ca5853b3ea6390a3388e4761fc16e0655 |
Headers | show |
On Thu, Apr 30, 2015 at 10:06:54AM +0800, Axel Lin wrote:
> devm_ioremap_resource() returns ERR_PTR on failure.
Applied, thanks.
diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c index 50f49f3..3641d0e 100644 --- a/drivers/spi/spi-rb4xx.c +++ b/drivers/spi/spi-rb4xx.c @@ -145,7 +145,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev) r = platform_get_resource(pdev, IORESOURCE_MEM, 0); spi_base = devm_ioremap_resource(&pdev->dev, r); - if (!spi_base) + if (IS_ERR(spi_base)) return PTR_ERR(spi_base); master = spi_alloc_master(&pdev->dev, sizeof(*rbspi));
devm_ioremap_resource() returns ERR_PTR on failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> --- drivers/spi/spi-rb4xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)