From patchwork Tue Nov 8 19:13:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 623137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AD99C433FE for ; Tue, 8 Nov 2022 19:13:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbiKHTNQ (ORCPT ); Tue, 8 Nov 2022 14:13:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiKHTNP (ORCPT ); Tue, 8 Nov 2022 14:13:15 -0500 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B106862CD; Tue, 8 Nov 2022 11:13:14 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.96,148,1665414000"; d="scan'208";a="139381110" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 09 Nov 2022 04:13:13 +0900 Received: from localhost.localdomain (unknown [10.226.92.5]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id B8AC84006DFE; Wed, 9 Nov 2022 04:13:11 +0900 (JST) From: Biju Das To: Linus Walleij Cc: Biju Das , Geert Uytterhoeven , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, Chris Paterson , Prabhakar Mahadev Lad Subject: [PATCH] pinctrl: renesas: pinctrl-rzg2l: remove unnecessary check from rzg2l_dt_node_to_map() Date: Tue, 8 Nov 2022 19:13:09 +0000 Message-Id: <20221108191309.3908415-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This patch removes the unnecessary check from rzg2l_dt_node_to_map() as the ret value is already negative. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index a43824fd9505..4e79b2961232 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -435,8 +435,7 @@ static int rzg2l_dt_node_to_map(struct pinctrl_dev *pctldev, ret = -EINVAL; done: - if (ret < 0) - rzg2l_dt_free_map(pctldev, *map, *num_maps); + rzg2l_dt_free_map(pctldev, *map, *num_maps); return ret; }