Skip to contentSkip to conversation

bus: ti-sysc: Fix optional clocks array access

PATCH New Tony Lindgren 1 participant 1 message May 17, 2018 OMAP2+ support

lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/1 bus: ti-sysc: Fix optional clocks array access

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 <[email protected]>
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/ti-sysc.c +1 -1
@@ -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;
 			}
Signature · 1 line
2.17.0