diff options
author | Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | 2012-01-30 19:06:42 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:02:43 +0200 |
commit | 7d2abb1b181c2d291990a7fbe052564f670466c3 (patch) | |
tree | a639e0c816a9dcc12bf017db2e5560e8efcca345 | |
parent | 14ff317825d2b2c1f0d01de67cdb4e4beb484023 (diff) |
mach-ux500:board-u5500: Add missing return value
ST-Ericsson ID: 412077
ST-Ericsson Linux next: N/A
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ifdc03da2d01f6b2d3f140d83a18080feda08acaf
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47101
Reviewed-by: QABUILD
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r-- | arch/arm/mach-ux500/board-u5500.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 05937a63919..3a874c10326 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c @@ -740,7 +740,7 @@ static int __init u5500_accel_sensor_init(void) i2c2 = i2c_get_adapter(2); if (!i2c2) { pr_err("failed to get i2c adapter\n"); - return; + return -ENODEV; } status = i2c_smbus_xfer(i2c2, 0x19 , 0, I2C_SMBUS_READ, 0x0F , @@ -748,8 +748,11 @@ static int __init u5500_accel_sensor_init(void) if (status < 0) lsm303dlh_pdata.chip_id = 0; else - lsm303dlh_pdata.chip_id = data.byte; + lsm303dlh_pdata.chip_id = data.byte; + i2c_put_adapter(i2c2); + + return status; } module_init(u5500_accel_sensor_init); |