Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37cf9b2d authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab
Browse files

[media] mn88473: fix error path on probe()



Latest, 3rd, regmap instance should be freed on error case.

Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 9c2ccd3c
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -536,7 +536,7 @@ static int mn88473_probe(struct i2c_client *client,
	/* Sleep because chip is active by default */
	/* Sleep because chip is active by default */
	ret = regmap_write(dev->regmap[2], 0x05, 0x3e);
	ret = regmap_write(dev->regmap[2], 0x05, 0x3e);
	if (ret)
	if (ret)
		goto err_client_2_i2c_unregister_device;
		goto err_regmap_2_regmap_exit;


	/* Create dvb frontend */
	/* Create dvb frontend */
	memcpy(&dev->frontend.ops, &mn88473_ops, sizeof(dev->frontend.ops));
	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");
	dev_info(&client->dev, "Panasonic MN88473 successfully identified\n");


	return 0;
	return 0;

err_regmap_2_regmap_exit:
	regmap_exit(dev->regmap[2]);
err_client_2_i2c_unregister_device:
err_client_2_i2c_unregister_device:
	i2c_unregister_device(dev->client[2]);
	i2c_unregister_device(dev->client[2]);
err_regmap_1_regmap_exit:
err_regmap_1_regmap_exit: