summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/sdio.c
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2015-07-02 19:11:33 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-07-06 11:15:42 -0700
commit7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c (patch)
tree795c417753c813f7ace5b93aa43a2d23603b0d04 /drivers/staging/greybus/sdio.c
parent08ccc9be680debdeb9eb2dcaa83c5fc7cd71f487 (diff)
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>
Diffstat (limited to 'drivers/staging/greybus/sdio.c')
-rw-r--r--drivers/staging/greybus/sdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
index f6adf0908d2e..8dd833eb9301 100644
--- a/drivers/staging/greybus/sdio.c
+++ b/drivers/staging/greybus/sdio.c
@@ -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;
}