Skip to contentSkip to conversation

spi: rb4xx: Fix checking return value of devm_ioremap_resource()

PATCH Applied Axel Lin 2 participants 2 messages Apr 30, 2015 – May 1, 2015 1 message not in the archive SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: rb4xx: Fix checking return value of devm_ioremap_resource()

devm_ioremap_resource() returns ERR_PTR on failure.

---
 drivers/spi/spi-rb4xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-rb4xx.c +1 -1
index 50f49f3..3641d0e 100644
@@ -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]

Applied
#2 lore raw
Quoted 1 line · Axel Lin

devm_ioremap_resource() returns ERR_PTR on failure.

Applied, thanks.