diff mbox

mmc: sdio: avoid using NULL sdio_irq_thread pointer

Message ID 1436499405-41847-1-git-send-email-yangbo.lu@freescale.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

yangbo lu July 10, 2015, 3:36 a.m. UTC
For Freescale QorIQ LS1021AQDS board, there is a SDIO interrupt
in the process of resume without inserting SD adapter because of
some unknown issue. But the driver doesn't assign sdio_irq_thread
pointer. This will block the resume of kernel. This patch is used
to avoid using NULL sdio_irq_thread pointer.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
---
 include/linux/mmc/host.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ulf Hansson July 21, 2015, 11:11 a.m. UTC | #1
On 10 July 2015 at 05:36, Yangbo Lu <yangbo.lu@freescale.com> wrote:
> For Freescale QorIQ LS1021AQDS board, there is a SDIO interrupt
> in the process of resume without inserting SD adapter because of
> some unknown issue. But the driver doesn't assign sdio_irq_thread
> pointer. This will block the resume of kernel. This patch is used
> to avoid using NULL sdio_irq_thread pointer.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>

Thanks, applied!

Kind regards
Uffe

> ---
>  include/linux/mmc/host.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 1369e54..83b81fd 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -412,7 +412,8 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host)
>  {
>         host->ops->enable_sdio_irq(host, 0);
>         host->sdio_irq_pending = true;
> -       wake_up_process(host->sdio_irq_thread);
> +       if (host->sdio_irq_thread)
> +               wake_up_process(host->sdio_irq_thread);
>  }
>
>  void sdio_run_irqs(struct mmc_host *host);
> --
> 2.1.0.27.g96db324
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 1369e54..83b81fd 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -412,7 +412,8 @@  static inline void mmc_signal_sdio_irq(struct mmc_host *host)
 {
 	host->ops->enable_sdio_irq(host, 0);
 	host->sdio_irq_pending = true;
-	wake_up_process(host->sdio_irq_thread);
+	if (host->sdio_irq_thread)
+		wake_up_process(host->sdio_irq_thread);
 }
 
 void sdio_run_irqs(struct mmc_host *host);