Skip to contentSkip to conversation

powerpc/512x: fix clk_get() return value

PATCH Applied Akinobu Mita 2 participants 2 messages Aug 31, 2010 – Sep 1, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/512x: fix clk_get() return value

clk_get() should return an ERR_PTR value on error, not NULL.

---
 arch/powerpc/platforms/512x/clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/platforms/512x/clock.c +1 -1
index 5b243bd..3dc2a8d 100644
@@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
 	int id_match = 0;
 
 	if (dev == NULL || id == NULL)
-		return NULL;
+		return clk;
 
 	mutex_lock(&clocks_mutex);
 	list_for_each_entry(p, &clocks, node) {
Signature · 1 line
1.7.1.231.gd0b16
Applied
#1 lore raw
Quoted 5 lines · Akinobu Mita

clk_get() should return an ERR_PTR value on error, not NULL.

applied, thanks.

g.

Quoted 20 lines
---
 arch/powerpc/platforms/512x/clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/platforms/512x/clock.c +1 -1
index 5b243bd..3dc2a8d 100644
@@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
 	int id_match = 0;
 
 	if (dev == NULL || id == NULL)
-		return NULL;
+		return clk;
 
 	mutex_lock(&clocks_mutex);
 	list_for_each_entry(p, &clocks, node) {
Signature · 1 line
1.7.1.231.gd0b16