Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609178 > unrolled thread

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

Started byBelen Sarabia <belensarabia@gmail.com>
First post2017-03-25 17:00 +0100
Last post2017-03-25 17:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] mailbox: rockchip: Delete redundant return value check of  platform_get_resource() Belen Sarabia <belensarabia@gmail.com> - 2017-03-25 17:00 +0100

#1609178 — [PATCH] mailbox: rockchip: Delete redundant return value check of platform_get_resource()

FromBelen Sarabia <belensarabia@gmail.com>
Date2017-03-25 17:00 +0100
Subject[PATCH] mailbox: rockchip: Delete redundant return value check of platform_get_resource()
Message-ID<toWgG-2VS-5@gated-at.bofh.it>
Delete redundant error handling on the result to platform_get_resource() when the value is
passed to devm_ioremap_resource().

Signed-off-by: Belen Sarabia <belensarabia@gmail.com>
---
 drivers/mailbox/rockchip-mailbox.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-mailbox.c
index d702a20..4dae133 100644
--- a/drivers/mailbox/rockchip-mailbox.c
+++ b/drivers/mailbox/rockchip-mailbox.c
@@ -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);
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web