[PATCH v2 1/3] staging: greybus: sdio: fix cmd_flags check for none response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Rui Miguel Silva <rmfrfs@xxxxxxxxx>
---
 drivers/staging/greybus/sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
index c7133b1..5649ef1 100644
--- a/drivers/staging/greybus/sdio.c
+++ b/drivers/staging/greybus/sdio.c
@@ -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 */
-- 
2.10.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux