[media] mn88473: fix error path on probe()
authorAntti Palosaari <crope@iki.fi>
Sat, 14 May 2016 05:29:21 +0000 (02:29 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 7 Jun 2016 18:38:44 +0000 (15:38 -0300)
Latest, 3rd, regmap instance should be freed on error case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/mn88473.c

index 6c5d592161d4ed2e203e86edbb6aea60939e3fb1..e6933d4cd582471e3e1715a464664c934860bfd6 100644 (file)
@@ -536,7 +536,7 @@ static int mn88473_probe(struct i2c_client *client,
        /* Sleep because chip is active by default */
        ret = regmap_write(dev->regmap[2], 0x05, 0x3e);
        if (ret)
-               goto err_client_2_i2c_unregister_device;
+               goto err_regmap_2_regmap_exit;
 
        /* Create dvb frontend */
        memcpy(&dev->frontend.ops, &mn88473_ops, sizeof(dev->frontend.ops));
@@ -547,7 +547,8 @@ static int mn88473_probe(struct i2c_client *client,
        dev_info(&client->dev, "Panasonic MN88473 successfully identified\n");
 
        return 0;
-
+err_regmap_2_regmap_exit:
+       regmap_exit(dev->regmap[2]);
 err_client_2_i2c_unregister_device:
        i2c_unregister_device(dev->client[2]);
 err_regmap_1_regmap_exit: