]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
greybus: sdio: fix call to stop command if no data exist
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 2 Jul 2015 18:11:33 +0000 (19:11 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 6 Jul 2015 18:15:42 +0000 (11:15 -0700)
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>
drivers/staging/greybus/sdio.c

index f6adf0908d2e01f5154a715225ad5472389b0241..8dd833eb93011bfa4d82cb90b6dc958f149b57a7 100644 (file)
@@ -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;
        }