From patchwork Wed Jul 11 12:34:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 942465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41QdZC6p1wz9s0n for ; Wed, 11 Jul 2018 22:25:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732394AbeGKM32 (ORCPT ); Wed, 11 Jul 2018 08:29:28 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59626 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726632AbeGKM31 (ORCPT ); Wed, 11 Jul 2018 08:29:27 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DA9AC558683E7; Wed, 11 Jul 2018 20:25:16 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.382.0; Wed, 11 Jul 2018 20:25:11 +0800 From: Wei Yongjun To: Ludovic Desroches , Linus Walleij , Nicolas Ferre , Alexandre Belloni CC: Wei Yongjun , , , Subject: [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource() Date: Wed, 11 Jul 2018 12:34:07 +0000 Message-ID: <1531312447-134423-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Reviewed-by: Alexandre Belloni Acked-by: Ludovic Desroches --- drivers/pinctrl/pinctrl-at91-pio4.c | 4 ---- 1 file changed, 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index 8f06197..ef7ab20 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -971,10 +971,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev) atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "unable to get atmel pinctrl resource\n"); - return -EINVAL; - } atmel_pioctrl->reg_base = devm_ioremap_resource(dev, res); if (IS_ERR(atmel_pioctrl->reg_base)) return -EINVAL;