Browse Source

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>
Wolfram Sang 13 years ago
parent
commit
772ae99c5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/i2c/busses/i2c-eg20t.c

+ 1 - 1
drivers/i2c/busses/i2c-eg20t.c

@@ -699,7 +699,7 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 
 	ret = mutex_lock_interruptible(&pch_mutex);
 	if (ret)
-		return -ERESTARTSYS;
+		return ret;
 
 	if (adap->p_adapter_info->pch_i2c_suspended) {
 		mutex_unlock(&pch_mutex);