Merge tag 'davinci-for-v4.4/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/fixes-non-critical

Merge "DaVinci non-critical fixes for v4.4" from Sekhar Nori:

Fix for incorrect handling of NULL clk pointer in
DaVinci clock code. And a fix to use a more appropiate
format specifier in a debug message.

* tag 'davinci-for-v4.4/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: davinci: clock: Correct return values for API functions
  ARM: davinci: re-use %*ph specifier
This commit is contained in:
Arnd Bergmann
2015-10-08 17:24:08 +02:00
2 changed files with 12 additions and 8 deletions

View File

@@ -546,9 +546,7 @@ static int dm6444evm_msp430_get_pins(void)
if (status < 0)
return status;
dev_dbg(&dm6446evm_msp->dev,
"PINS: %02x %02x %02x %02x\n",
buf[0], buf[1], buf[2], buf[3]);
dev_dbg(&dm6446evm_msp->dev, "PINS: %4ph\n", buf);
return (buf[3] << 8) | buf[2];
}

View File

@@ -97,7 +97,9 @@ int clk_enable(struct clk *clk)
{
unsigned long flags;
if (clk == NULL || IS_ERR(clk))
if (!clk)
return 0;
else if (IS_ERR(clk))
return -EINVAL;
spin_lock_irqsave(&clockfw_lock, flags);
@@ -124,7 +126,7 @@ EXPORT_SYMBOL(clk_disable);
unsigned long clk_get_rate(struct clk *clk)
{
if (clk == NULL || IS_ERR(clk))
return -EINVAL;
return 0;
return clk->rate;
}
@@ -159,8 +161,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
unsigned long flags;
int ret = -EINVAL;
if (clk == NULL || IS_ERR(clk))
return ret;
if (!clk)
return 0;
else if (IS_ERR(clk))
return -EINVAL;
if (clk->set_rate)
ret = clk->set_rate(clk, rate);
@@ -181,7 +185,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
{
unsigned long flags;
if (clk == NULL || IS_ERR(clk))
if (!clk)
return 0;
else if (IS_ERR(clk))
return -EINVAL;
/* Cannot change parent on enabled clock */