From: Rui Miguel Silva Date: Thu, 2 Jul 2015 18:11:33 +0000 (+0100) Subject: greybus: sdio: fix call to stop command if no data exist X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- 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; }