Commit cae72c7c authored by HIRANO Takahito's avatar HIRANO Takahito Committed by Mauro Carvalho Chehab

[media] Fix panic on loading earth-pt1

Signed-off-by: default avatarHIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 59983439
...@@ -1090,6 +1090,7 @@ pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1090,6 +1090,7 @@ pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
i2c_adap->algo = &pt1_i2c_algo; i2c_adap->algo = &pt1_i2c_algo;
i2c_adap->algo_data = NULL; i2c_adap->algo_data = NULL;
i2c_adap->dev.parent = &pdev->dev; i2c_adap->dev.parent = &pdev->dev;
strcpy(i2c_adap->name, DRIVER_NAME);
i2c_set_adapdata(i2c_adap, pt1); i2c_set_adapdata(i2c_adap, pt1);
ret = i2c_add_adapter(i2c_adap); ret = i2c_add_adapter(i2c_adap);
if (ret < 0) if (ret < 0)
...@@ -1156,10 +1157,10 @@ pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1156,10 +1157,10 @@ pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pt1->power = 0; pt1->power = 0;
pt1->reset = 1; pt1->reset = 1;
pt1_update_power(pt1); pt1_update_power(pt1);
err_pt1_cleanup_adapters:
pt1_cleanup_adapters(pt1);
err_i2c_del_adapter: err_i2c_del_adapter:
i2c_del_adapter(i2c_adap); i2c_del_adapter(i2c_adap);
err_pt1_cleanup_adapters:
pt1_cleanup_adapters(pt1);
err_kfree: err_kfree:
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
kfree(pt1); kfree(pt1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment