提交 85a42dc8 编写于 作者: R Rui Miguel Silva 提交者: Greg Kroah-Hartman

staging: greybus: sdio: fix cmd_flags check for none response

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 71bad7f0
...@@ -478,7 +478,7 @@ static int gb_sdio_command(struct gb_sdio_host *host, struct mmc_command *cmd) ...@@ -478,7 +478,7 @@ static int gb_sdio_command(struct gb_sdio_host *host, struct mmc_command *cmd)
goto out; goto out;
/* no response expected */ /* no response expected */
if (cmd_flags & GB_SDIO_RSP_NONE) if (cmd_flags == GB_SDIO_RSP_NONE)
goto out; goto out;
/* long response expected */ /* long response expected */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册