Skip to content

Commit 59482fe

Browse files
mitaglikely
authored andcommitted
powerpc/512x: fix clk_get() return value
clk_get() should return an ERR_PTR value on error, not NULL. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Grant Likely <[email protected]>
1 parent 2bfc96a commit 59482fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/platforms/512x/clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
5757
int id_match = 0;
5858

5959
if (dev == NULL || id == NULL)
60-
return NULL;
60+
return clk;
6161

6262
mutex_lock(&clocks_mutex);
6363
list_for_each_entry(p, &clocks, node) {

0 commit comments

Comments
 (0)