]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bus: ti-sysc: Fix sysc_unprepare() when no clocks have been allocated
authorTony Lindgren <tony@atomide.com>
Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitcb222603787e32d0a336061f91961810ae4855b4
treef4c1c4f567c330eecb2289abb90589d57ca94b9c
parent61537199691c1cf852b8afe63a12060eed7a5cb9
bus: ti-sysc: Fix sysc_unprepare() when no clocks have been allocated

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit aaa29bb01cc4bf5a87dbdb219efba3b09f259d8e ]

If we return early before ddata->clocks have been allocated we will get a
NULL pointer dereference in sysc_unprepare(). Let's fix this by returning
early when no clocks are allocated.

Fixes: 0eecc636e5a2 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver")
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>
drivers/bus/ti-sysc.c