From 7a5cd5aea29a6fa0d99fb3b667b96b8d5f4e596c Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva Date: Thu, 2 Jul 2015 19:11:33 +0100 Subject: [PATCH] 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 --- drivers/staging/greybus/sdio.c | 4 ++-- 1 file 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; } -- 2.7.4