diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2015-07-02 19:11:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-07-06 11:15:42 -0700 |
commit | 7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c (patch) | |
tree | 795c417753c813f7ace5b93aa43a2d23603b0d04 /drivers/staging/greybus/sdio.c | |
parent | 08ccc9be680debdeb9eb2dcaa83c5fc7cd71f487 (diff) | |
download | op-kernel-dev-7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c.zip op-kernel-dev-7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c index f6adf09..8dd833e 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; } |