greybus: sdio: fix call to stop command if no data exist
If data is not available the stop command could dereference NULL. Fetch the stop command directly from the request instead. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
08ccc9be68
commit
7a5cd5aea2
@ -443,8 +443,8 @@ static void gb_sdio_mrq_work(struct work_struct *work)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (mrq->data->stop) {
|
||||
ret = gb_sdio_command(host, mrq->data->stop);
|
||||
if (mrq->stop) {
|
||||
ret = gb_sdio_command(host, mrq->stop);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user