diff mbox series

[U-Boot,1/1] cmd: gpio: remove redundant assignment

Message ID 20190822201941.10771-1-xypron.glpk@gmx.de
State Accepted, archived
Commit e946b5d257c4782aca9271eb6c6ec410422025f1
Delegated to: Tom Rini
Headers show
Series [U-Boot,1/1] cmd: gpio: remove redundant assignment | expand

Commit Message

Heinrich Schuchardt Aug. 22, 2019, 8:19 p.m. UTC
The assigned value NULL is overwritten before being used. Remove the
assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 cmd/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1

Comments

Bin Meng Aug. 23, 2019, 3:22 a.m. UTC | #1
On Fri, Aug 23, 2019 at 4:19 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> The assigned value NULL is overwritten before being used. Remove the
> assignment.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  cmd/gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini Aug. 27, 2019, 12:18 a.m. UTC | #2
On Thu, Aug 22, 2019 at 10:19:41PM +0200, Heinrich Schuchardt wrote:

> The assigned value NULL is overwritten before being used. Remove the
> assignment.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/cmd/gpio.c b/cmd/gpio.c
index 53366f36e7..eff36ab2af 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -91,7 +91,7 @@  static int do_gpio_status(bool all, const char *gpio_name)

 		if (!gpio_name || !bank_name ||
 		    !strncasecmp(gpio_name, bank_name, banklen)) {
-			const char *p = NULL;
+			const char *p;
 			int offset;

 			p = gpio_name + banklen;