In mspro_stop_seq_mode(), ms_send_cmd() may fail. The patch attempts to detect a failure before flushing the registers via rtsx_write_register. Signed-off-by: Aditya Pakki <pakki001@xxxxxxx> --- drivers/staging/rts5208/ms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c index f53adf15c685..04b588b8b376 100644 --- a/drivers/staging/rts5208/ms.c +++ b/drivers/staging/rts5208/ms.c @@ -2586,7 +2586,9 @@ void mspro_stop_seq_mode(struct rtsx_chip *chip) ms_card->seq_mode = 0; ms_card->total_sec_cnt = 0; - ms_send_cmd(chip, PRO_STOP, WAIT_INT); + retval = ms_send_cmd(chip, PRO_STOP, WAIT_INT); + if (retval != STATUS_SUCCESS) + return; rtsx_write_register(chip, RBCTL, RB_FLUSH, RB_FLUSH); } -- 2.17.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel