public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Belen Sarabia <belensarabia@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource()
Date: Sat, 25 Mar 2017 19:26:47 +0100	[thread overview]
Message-ID: <20170325182647.GA2934@belen-VirtualBox> (raw)

devm_ioremap_resource does checks on the resource. No need to
duplicate this in the driver.

Signed-off-by: Belén Sarabia <belensarabia@gmail.com>
---
Changes in v2:
  - Subject line expected by the subsystem.
  - Remove one line more.
---
 drivers/mfd/ipaq-micro.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
index df16fd1..124aad2 100644
--- a/drivers/mfd/ipaq-micro.c
+++ b/drivers/mfd/ipaq-micro.c
@@ -400,9 +400,6 @@ static int __init micro_probe(struct platform_device *pdev)
 	micro->dev = &pdev->dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-
 	micro->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(micro->base))
 		return PTR_ERR(micro->base);
-- 
1.9.1

             reply	other threads:[~2017-03-25 18:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25 18:26 Belen Sarabia [this message]
2017-03-27 12:41 ` [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource() Lee Jones

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=20170325182647.GA2934@belen-VirtualBox \
    --to=belensarabia@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.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