]> git.baikalelectronics.ru Git - kernel.git/commit
MMC: meson: avoid possible NULL dereference
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 23 Dec 2016 15:01:08 +0000 (16:01 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Jan 2017 10:53:00 +0000 (11:53 +0100)
commit08bdc2cacba356bb410e13bf9a4aad215ea633ef
treeeb07f9ad51e0b4dc6a66a35a001f259ca02ad646
parent56bfd77d2de4945a1b3920bf962cd2407ff74379
MMC: meson: avoid possible NULL dereference

No actual segmentation faults were observed but the coding is
at least inconsistent.

irqreturn_t meson_mmc_irq():

We should not dereference host before checking it.

meson_mmc_irq_thread():

If cmd or mrq are NULL we should not dereference them after
writing a warning.

Fixes: d9070c09fdfd MMC: meson: initial support for GX platforms
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-gx-mmc.c