bus: ti-sysc: Fix getting optional clocks in clock_roles
authorTony Lindgren <tony@atomide.com>
Thu, 15 Nov 2018 22:46:52 +0000 (14:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:23 +0000 (08:51 +0100)
commit65930054756acfbacddf6f80bd55a6f23a8937f6
treefe855cd72c975070849ca797651e4a122e073dc0
parented973f15f445352cd92efadfa47135c237561b5e
bus: ti-sysc: Fix getting optional clocks in clock_roles

[ Upstream commit 7b4f8ac2f1acdff3c0cce23d8c3b86434a6e768a ]

We can have holes in clock_roles with interface clock missing for
example. Currently getting an optional clock will fail if there are
only a functional clock and an optional clock.

Fixes: 09dfe5810762 ("bus: ti-sysc: Add handling for clkctrl opt clocks")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c