Skip to contentSkip to conversation

media: i2c: adv748x: Fix cleanup jump on chip identification

PATCH In review Kieran Bingham 2 participants 2 messages Feb 7, 2018 – Feb 9, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: i2c: adv748x: Fix cleanup jump on chip identification

From: Kieran Bingham <[email protected]>

The error handling for the adv748x_identify_chip() call erroneously jumps to the err_cleanup_clients label before the clients have been established.

Correct this by jumping to the next (and correct) label in the cleanup
code: err_cleanup_dt.

Fixes 3e89586a64df ("media: i2c: adv748x: add adv748x driver")
---
 drivers/media/i2c/adv748x/adv748x-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/adv748x/adv748x-core.c +1 -1
index 6d62b817ed00..6ccaad7e9eca 100644
@@ -651,7 +651,7 @@ static int adv748x_probe(struct i2c_client *client,
 	ret = adv748x_identify_chip(state);
 	if (ret) {
 		adv_err(state, "Failed to identify chip");
-		goto err_cleanup_clients;
+		goto err_cleanup_dt;
 	}
 
 	/* Configure remaining pages as I2C clients with regmap access */
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw

Hi Kieran,

Thanks for your patch.

Quoted 6 lines · Kieran Bingham

From: Kieran Bingham <[email protected]>

The error handling for the adv748x_identify_chip() call erroneously jumps to the err_cleanup_clients label before the clients have been established.

Quoted 6 lines

Correct this by jumping to the next (and correct) label in the cleanup
code: err_cleanup_dt.

Fixes 3e89586a64df ("media: i2c: adv748x: add adv748x driver")
Quoted 20 lines
---
 drivers/media/i2c/adv748x/adv748x-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/adv748x/adv748x-core.c +1 -1
index 6d62b817ed00..6ccaad7e9eca 100644
@@ -651,7 +651,7 @@ static int adv748x_probe(struct i2c_client *client,
 	ret = adv748x_identify_chip(state);
 	if (ret) {
 		adv_err(state, "Failed to identify chip");
-		goto err_cleanup_clients;
+		goto err_cleanup_dt;
 	}
 
 	/* Configure remaining pages as I2C clients with regmap access */
Signature · 1 line
2.7.4
Signature · 2 lines
Regards,
Niklas Söderlund