Skip to contentSkip to conversation

mailbox: rockchip: Delete redundant return value check of platform_get_resource()

PATCH New Belen Sarabia 1 participant 1 message Mar 25, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: rockchip: Delete redundant return value check of platform_get_resource()

Delete redundant error handling on the result to platform_get_resource() when the value is passed to devm_ioremap_resource().

---
 drivers/mailbox/rockchip-mailbox.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mailbox/rockchip-mailbox.c +0 -3
index d702a20..4dae133 100644
@@ -205,9 +205,6 @@ static int rockchip_mbox_probe(struct platform_device *pdev)
 	mb->mbox.txdone_irq = true;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	mb->mbox_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(mb->mbox_base))
 		return PTR_ERR(mb->mbox_base);
Signature · 1 line
1.9.1