]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ARM: OMAP1: ams-delta: Fix possible use of uninitialized field
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Wed, 7 Nov 2018 21:30:31 +0000 (22:30 +0100)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:45:07 +0000 (09:45 -0600)
commit87cd87e683ac4b87f45aa9a7361b94a25f42b3f5
treec98b1fdc5787dfa719efd68c30eca5d8207e3d34
parent80f33676a5f6a74f14cb0016f25e53048d6e92d5
ARM: OMAP1: ams-delta: Fix possible use of uninitialized field

BugLink: https://bugs.launchpad.net/bugs/1837161
[ Upstream commit cec83ff1241ec98113a19385ea9e9cfa9aa4125b ]

While playing with initialization order of modem device, it has been
discovered that under some circumstances (early console init, I
believe) its .pm() callback may be called before the
uart_port->private_data pointer is initialized from
plat_serial8250_port->private_data, resulting in NULL pointer
dereference.  Fix it by checking for uninitialized pointer before using
it in modem_pm().

Fixes: aabf31737a6a ("ARM: OMAP1: ams-delta: update the modem to use regulator API")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm/mach-omap1/board-ams-delta.c