]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: greybus: sdio: fix cmd_flags check for none response
authorRui Miguel Silva <rmfrfs@gmail.com>
Fri, 30 Sep 2016 18:24:31 +0000 (19:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 2 Oct 2016 13:49:25 +0000 (15:49 +0200)
When checking for command flags field if response is not available we
really need to compare it with the right define and not bitwise AND it.

smatch warn:
        drivers/staging/greybus/sdio.c:481 gb_sdio_command()
        warn: bitwise AND condition is false here

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/sdio.c

index c7133b1c7fd843ee5b2d456038430cf8e1d87f41..5649ef1e379d14c31e120cfb49f00eba7ab77404 100644 (file)
@@ -478,7 +478,7 @@ static int gb_sdio_command(struct gb_sdio_host *host, struct mmc_command *cmd)
                goto out;
 
        /* no response expected */
-       if (cmd_flags & GB_SDIO_RSP_NONE)
+       if (cmd_flags == GB_SDIO_RSP_NONE)
                goto out;
 
        /* long response expected */