diff options
author | Matwey V. Kornilov <matwey.kornilov@gmail.com> | 2019-08-01 18:00:05 +0300 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2019-08-09 13:45:25 +0800 |
commit | 3148a3c2d32e3a0d58914d1a219e7fd2f0cb001e (patch) | |
tree | 905495e5536cdedd2a12c5c6d4aa427a4d9a8db7 /drivers/mmc/kona_sdhci.c | |
parent | 68b3e8b39802739b9628fbeb827adb0746a44f15 (diff) |
mmc: zynq_sdhci: fix uninitialized pointer deref on probe
Since commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field. Move the mmc field initialization before sdhci_setup_cfg()
call to avoid crash on mmc pointer dereference.
[this patch is based on commit 41a9fab8dac8 ("mmc: mv_sdhci: fix
uninitialized pointer deref on probe") by Baruch Siach]
Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu102/zc706)
Diffstat (limited to 'drivers/mmc/kona_sdhci.c')
0 files changed, 0 insertions, 0 deletions