Files
u-boot/drivers
Masahiro Yamada bf9c4d1464 mmc: sdhci: fix NULL pointer access when host->ops is not set
Until recently, sdhci_ops was used only for overriding IO accessors.
(so, host->ops was not set by any drivers except bcm2835_sdhci.c)

Now, we have more optional callbacks, get_cd, set_control_reg, and
set_clock.  However, the code

    if (host->ops->get_cd)
            host->ops->get_cd(host);

... expects host->ops is set for all drivers.

Commit 5e96217f04 ("mmc: pic32_sdhci: move the code to
pic32_sdhci.c") and commit 62226b6863 ("mmc: sdhci: move the
callback function into sdhci_ops") added sdhci_ops for pic32_sdhci.c
and s5p_sdhci.c, but the other drivers still do not (need not) set
host->ops because all callbacks in sdhci_ops are optional.

host->ops must be checked to avoid the system crash caused by NULL
pointer access.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-13 12:17:03 +09:00
..
2015-11-02 10:38:00 +09:00
2016-12-20 09:15:27 +01:00
2016-10-19 09:01:51 +02:00
2017-01-10 10:18:11 +01:00
2016-01-27 15:32:05 +01:00
2016-12-02 21:03:31 -07:00
2016-02-06 12:00:59 +01:00
2016-08-12 16:00:50 -04:00
2017-01-02 17:08:25 +01:00
2016-12-27 11:24:10 -05:00
2016-11-28 19:49:49 -05:00