summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2019-11-18 14:02:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-09 10:19:41 +0100
commitd8fe0af636c54074c293b8c553e05614420e91e3 (patch)
tree4c7c2b6d501ae2d613d6b089b1ff8fc4b1316e98 /drivers/nvme
parent5825c88e96518d8793f99e8c70aa0b0396642b45 (diff)
drm/mcde: dsi: Fix invalid pointer dereference if panel cannot be found
[ Upstream commit c131280c03bd1c225c2e64e9ef75873ffca3d96e ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions