From: Belen Sarabia <belensarabia@gmail.com>
To: Jassi Brar <jassisinghbrar@gmail.com>, Heiko Stuebner <heiko@sntech.de>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: [PATCH] mailbox: rockchip: Delete redundant return value check of platform_get_resource()
Date: Sat, 25 Mar 2017 16:56:18 +0100 [thread overview]
Message-ID: <20170325155618.GA2806@belen-VirtualBox> (raw)
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
reply other threads:[~2017-03-25 15:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170325155618.GA2806@belen-VirtualBox \
--to=belensarabia@gmail.com \
--cc=heiko@sntech.de \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox