From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbdCYS07 (ORCPT ); Sat, 25 Mar 2017 14:26:59 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36098 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbdCYS04 (ORCPT ); Sat, 25 Mar 2017 14:26:56 -0400 Date: Sat, 25 Mar 2017 19:26:47 +0100 From: Belen Sarabia To: Lee Jones Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2] mfd: ipaq-micro: Delete redundant return value check of platform_get_resource() Message-ID: <20170325182647.GA2934@belen-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org devm_ioremap_resource does checks on the resource. No need to duplicate this in the driver. Signed-off-by: Belén Sarabia --- 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