diff options
author | Wolfram Sang <wolfram@the-dreams.de> | 2012-04-19 11:01:59 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-05-12 08:28:13 -0400 |
commit | 772ae99c5b414fc7f5e4cf76beae7003196b5526 (patch) | |
tree | 05e1855591814dccc24dbf079b296697f0ec09df /drivers | |
parent | 75fb1f25d48b64ff11081623c2104ad345882c9f (diff) |
i2c: eg20t: pass on return value in i2c_xfer
smatch says:
drivers/i2c/busses/i2c-eg20t.c:702 pch_i2c_xfer() info: why not propagate 'ret' from mutex_lock_interruptible() instead of -512?
which is especially true since for -ENORESTARTSYS it is said in
linux/errno.h "signal_pending() MUST be set" which is not done here. So
just pass on the return value we got.
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-eg20t.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index 6e9e0759f7df..93926a73f043 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c | |||
@@ -699,7 +699,7 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
699 | 699 | ||
700 | ret = mutex_lock_interruptible(&pch_mutex); | 700 | ret = mutex_lock_interruptible(&pch_mutex); |
701 | if (ret) | 701 | if (ret) |
702 | return -ERESTARTSYS; | 702 | return ret; |
703 | 703 | ||
704 | if (adap->p_adapter_info->pch_i2c_suspended) { | 704 | if (adap->p_adapter_info->pch_i2c_suspended) { |
705 | mutex_unlock(&pch_mutex); | 705 | mutex_unlock(&pch_mutex); |