spi: rb4xx: Fix checking return value of devm_ioremap_resource()
PATCH 1/1 spi: rb4xx: Fix checking return value of devm_ioremap_resource()
devm_ioremap_resource() returns ERR_PTR on failure.
Signed-off-by Axel Lin <[email protected]>
--- drivers/spi/spi-rb4xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-rb4xx.c +1 -1
@@ -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));
Signature · 8 lines
2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mark Brown
AppliedQuoted 1 line · Axel Lin
devm_ioremap_resource()returnsERR_PTRon failure.
Applied, thanks.