Skip to content

Commit

Permalink
mfd: mc12xx-i2c: rtsx_pcr: ti-ssp: Remove redundant dev_set_drvdata
Browse files Browse the repository at this point in the history
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
Sachin Kamat authored and Lee Jones committed Oct 23, 2013
1 parent bef7816 commit af1192d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion drivers/mfd/mc13xxx-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ static int mc13xxx_i2c_probe(struct i2c_client *client,
ret = PTR_ERR(mc13xxx->regmap);
dev_err(mc13xxx->dev, "Failed to initialize register map: %d\n",
ret);
dev_set_drvdata(&client->dev, NULL);
return ret;
}

Expand Down
5 changes: 1 addition & 4 deletions drivers/mfd/rtsx_pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
pcr->remap_addr = ioremap_nocache(base, len);
if (!pcr->remap_addr) {
ret = -ENOMEM;
goto free_host;
goto free_handle;
}

pcr->rtsx_resv_buf = dma_alloc_coherent(&(pcidev->dev),
Expand Down Expand Up @@ -1209,8 +1209,6 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
pcr->rtsx_resv_buf, pcr->rtsx_resv_buf_addr);
unmap:
iounmap(pcr->remap_addr);
free_host:
dev_set_drvdata(&pcidev->dev, NULL);
free_handle:
kfree(handle);
free_pcr:
Expand Down Expand Up @@ -1242,7 +1240,6 @@ static void rtsx_pci_remove(struct pci_dev *pcidev)
pci_disable_msi(pcr->pci);
iounmap(pcr->remap_addr);

dev_set_drvdata(&pcidev->dev, NULL);
pci_release_regions(pcidev);
pci_disable_device(pcidev);

Expand Down
1 change: 0 additions & 1 deletion drivers/mfd/ti-ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ static int ti_ssp_remove(struct platform_device *pdev)
iounmap(ssp->regs);
release_mem_region(ssp->res->start, resource_size(ssp->res));
kfree(ssp);
dev_set_drvdata(dev, NULL);
return 0;
}

Expand Down

0 comments on commit af1192d

Please sign in to comment.