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