Commit 7a5cd5ae authored by Rui Miguel Silva's avatar Rui Miguel Silva Committed by Greg Kroah-Hartman

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: default avatarRui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 08ccc9be
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment