Bluetooth: Wrong variable tested
PATCH 1/1 Bluetooth: Wrong variable tested
The return of the function sdio_readb() was not tested.
Signed-off-by Roel Kluin <[email protected]>
--- drivers/bluetooth/btmrvl_sdio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btmrvl_sdio.c +2 -2
@@ -348,7 +348,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)for (tries =0 ; tries <MAX_POLL_TRIES ; tries++) { base0 =sdio_readb (card->func,SQ_READ_BASE_ADDRESS_A0_REG , &ret); -if (ret) { +if (base0) { BT_ERR("BASE0 register read failed:" " base0 = 0x%04X(%d)." " Terminating download",
@@ -358,7 +358,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card) } base1 =sdio_readb (card->func,SQ_READ_BASE_ADDRESS_A1_REG , &ret); -if (ret) { +if (base1) { BT_ERR("BASE1 register read failed:" " base1 = 0x%04X(%d)." " Terminating download",
Quoted 1 line · Roel Kluin
The return of the function
sdio_readb()was not tested.
Please ignore, as Joe Perches pointed out it's wrong.
Roel