projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7679c0e
)
i2c: rcar: fix clk_get() error handling
author
Guennadi Liakhovetski
<g.liakhovetski@gmx.de>
Thu, 12 Sep 2013 12:36:47 +0000
(14:36 +0200)
committer
Wolfram Sang
<wsa@the-dreams.de>
Mon, 30 Sep 2013 04:02:32 +0000
(06:02 +0200)
When clk_get() fails, it returns an error code, not a NULL. This patch
fixes such an error handling bug.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rcar.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-rcar.c
b/drivers/i2c/busses/i2c-rcar.c
index 1f285a3be5c558d9b685be6f9b84592da84841cb..98276eb5f6e7d5928ee6789ab6fd6f81a7e5f111 100644
(file)
--- a/
drivers/i2c/busses/i2c-rcar.c
+++ b/
drivers/i2c/busses/i2c-rcar.c
@@
-234,9
+234,9
@@
static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv,
u32 cdf_width;
unsigned long rate;
- if (
!clkp
) {
- dev_err(dev, "
there is no peripheral_cl
k\n");
- return
-EIO
;
+ if (
IS_ERR(clkp)
) {
+ dev_err(dev, "
couldn't get cloc
k\n");
+ return
PTR_ERR(clkp)
;
}
switch (priv->devtype) {