diff mbox series

pinctrl: renesas: pinctrl-rzg2l: remove unnecessary check from rzg2l_dt_node_to_map()

Message ID 20221108191309.3908415-1-biju.das.jz@bp.renesas.com
State Accepted
Commit 41a87e789c7c2cdeb302331043f866c0138f0413
Headers show
Series pinctrl: renesas: pinctrl-rzg2l: remove unnecessary check from rzg2l_dt_node_to_map() | expand

Commit Message

Biju Das Nov. 8, 2022, 7:13 p.m. UTC
This patch removes the unnecessary check from rzg2l_dt_node_to_map()
as the ret value is already negative.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Geert Uytterhoeven Nov. 14, 2022, 2:08 p.m. UTC | #1
On Tue, Nov 8, 2022 at 8:13 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> This patch removes the unnecessary check from rzg2l_dt_node_to_map()
> as the ret value is already negative.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-pinctrl-for-v6.2.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

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;
 }