* [PATCH] bus: ti-sysc: Fix optional clocks array access
@ 2018-05-17 22:14 Tony Lindgren
0 siblings, 0 replies; only message in thread
From: Tony Lindgren @ 2018-05-17 22:14 UTC (permalink / raw)
To: linux-omap
Cc: Dave Gerlach, Greg Kroah-Hartman, Nishanth Menon, Suman Anna,
Tero Kristo, linux-kernel, linux-arm-kernel, Dan Carpenter
We should be checking ddata->clocks[i] instead of clock_names[i]
for the optional clocks. Currently this just happens to work for
the typical case of one fck and one optional clock.
Fixes: 09dfe5810762 ("bus: ti-sysc: Add handling for clkctrl opt clocks")
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/bus/ti-sysc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -128,7 +128,7 @@ static int sysc_get_one_clock(struct sysc *ddata, const char *name)
if (index < 0) {
for (i = SYSC_OPTFCK0; i < SYSC_MAX_CLOCKS; i++) {
- if (!clock_names[i]) {
+ if (!ddata->clocks[i]) {
index = i;
break;
}
--
2.17.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-17 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 22:14 [PATCH] bus: ti-sysc: Fix optional clocks array access Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).