I2C: mv64xxx: use return value from mv64xxx_i2c_map_regs()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 16 May 2013 10:32:08 +0000 (10:32 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 5 Jun 2013 21:06:29 +0000 (23:06 +0200)
mv64xxx_i2c_map_regs() already returns an error code, so lets
propagate that to mv64xxx_i2c_probe()'s caller.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-mv64xxx.c

index 1a3abd6..940a190 100644 (file)
@@ -619,10 +619,9 @@ mv64xxx_i2c_probe(struct platform_device *pd)
        if (!drv_data)
                return -ENOMEM;
 
-       if (mv64xxx_i2c_map_regs(pd, drv_data)) {
-               rc = -ENODEV;
+       rc = mv64xxx_i2c_map_regs(pd, drv_data);
+       if (rc)
                goto exit_kfree;
-       }
 
        strlcpy(drv_data->adapter.name, MV64XXX_I2C_CTLR_NAME " adapter",
                sizeof(drv_data->adapter.name));