|
@@ -595,7 +595,7 @@ static int octeon_i2c_probe(struct platform_device *pdev)
|
|
|
result = i2c_add_adapter(&i2c->adap);
|
|
|
if (result < 0) {
|
|
|
dev_err(i2c->dev, "failed to add adapter\n");
|
|
|
- goto fail_add;
|
|
|
+ goto out;
|
|
|
}
|
|
|
dev_info(i2c->dev, "version %s\n", DRV_VERSION);
|
|
|
|
|
@@ -603,8 +603,6 @@ static int octeon_i2c_probe(struct platform_device *pdev)
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
-fail_add:
|
|
|
- platform_set_drvdata(pdev, NULL);
|
|
|
out:
|
|
|
return result;
|
|
|
};
|
|
@@ -614,7 +612,6 @@ static int octeon_i2c_remove(struct platform_device *pdev)
|
|
|
struct octeon_i2c *i2c = platform_get_drvdata(pdev);
|
|
|
|
|
|
i2c_del_adapter(&i2c->adap);
|
|
|
- platform_set_drvdata(pdev, NULL);
|
|
|
return 0;
|
|
|
};
|
|
|
|