i2c: pmcmsp: fix error return from master_xfer
authorPeter Rosin <peda@axentia.se>
Wed, 9 May 2018 19:46:30 +0000 (21:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:03:00 +0000 (04:03 +0900)
commitcbfe697cdba95c055830f4e04cb4d30a4fdd6be1
treec154b8ef796ace0cfdf9bb7692894223b4573132
parent0c1885743a9bdd554d20c368d775142224abdff9
i2c: pmcmsp: fix error return from master_xfer

[ Upstream commit 12d9bbc5a7f347eaa65ff2a9d34995cadc05eb1b ]

Returning -1 (-EPERM) is not appropriate here, go with -EIO.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-pmcmsp.c