powerpc/512x: fix clk_get() return value
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 31 Aug 2010 08:43:51 +0000 (17:43 +0900)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 1 Sep 2010 15:31:06 +0000 (09:31 -0600)
clk_get() should return an ERR_PTR value on error, not NULL.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
arch/powerpc/platforms/512x/clock.c

index 5b243bd..3dc2a8d 100644 (file)
@@ -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) {