diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2019-11-18 14:02:52 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-11-20 21:31:24 +0100 |
commit | c131280c03bd1c225c2e64e9ef75873ffca3d96e (patch) | |
tree | efac6fe09f80498fa7071e3f0fb003189aca0e6d /drivers/gpu/drm/meson | |
parent | 0b8e7bbde5e7e2c419567e1ee29587dae3b78ee3 (diff) | |
download | linux-stable-c131280c03bd1c225c2e64e9ef75873ffca3d96e.tar.gz linux-stable-c131280c03bd1c225c2e64e9ef75873ffca3d96e.tar.bz2 linux-stable-c131280c03bd1c225c2e64e9ef75873ffca3d96e.zip |
drm/mcde: dsi: Fix invalid pointer dereference if panel cannot be found
The "panel" pointer is not reset to NULL if of_drm_find_panel()
returns an error. Therefore we later assume that a panel was found,
and try to dereference the error pointer, resulting in:
mcde-dsi a0351000.dsi: failed to find panel try bridge (4294966779)
Unable to handle kernel paging request at virtual address fffffe03
PC is at drm_panel_bridge_add.part.0+0x10/0x5c
LR is at mcde_dsi_bind+0x120/0x464
...
Reset "panel" to NULL to avoid this problem.
Also change the format string of the error to %ld to print
the negative errors correctly. The crash above then becomes:
mcde-dsi a0351000.dsi: failed to find panel try bridge (-517)
mcde-dsi a0351000.dsi: no panel or bridge
...
Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191118130252.170324-1-stephan@gerhold.net
Diffstat (limited to 'drivers/gpu/drm/meson')
0 files changed, 0 insertions, 0 deletions