From: Andrew Goodbody Date: Thu, 7 Aug 2025 14:41:18 +0000 (+0100) Subject: pinctrl: rzg2l: Variable may not have been assigned to X-Git-Tag: v2025.10-rc4~7^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8705ee4b6d3665f096017aaef5c1496ba7c74cc3;p=pandora-u-boot.git pinctrl: rzg2l: Variable may not have been assigned to In rzg2l_pinconf_set and rzg2l_get_pin_muxing if the call to rzg2l_selector_decode fails then the variable pin may not have been assigned to. Remove the use of pin from the error message. Also update the error message to show the invalid selector used instead of port which will be the error code returned. This issue was found by Smatch. Signed-off-by: Andrew Goodbody Reviewed-by: Paul Barker Reviewed-by: Marek Vasut --- diff --git a/drivers/pinctrl/renesas/rzg2l-pfc.c b/drivers/pinctrl/renesas/rzg2l-pfc.c index 3c751e9473a..4a75e0b2372 100644 --- a/drivers/pinctrl/renesas/rzg2l-pfc.c +++ b/drivers/pinctrl/renesas/rzg2l-pfc.c @@ -353,7 +353,7 @@ static int rzg2l_pinconf_set(struct udevice *dev, unsigned int pin_selector, /* The pin selector refers to a multiplexed pin */ int port = rzg2l_selector_decode(data, pin_selector, &pin); if (port < 0) { - dev_err(dev, "Invalid pin selector %u:%u\n", port, pin); + dev_err(dev, "Invalid pin selector %u\n", pin_selector); return port; } @@ -550,7 +550,7 @@ static int rzg2l_get_pin_muxing(struct udevice *dev, unsigned int selector, port = rzg2l_selector_decode(data, selector, &pin); if (port < 0) { - dev_err(dev, "Invalid pin selector %u:%u\n", port, pin); + dev_err(dev, "Invalid pin selector %u\n", selector); return port; }