mfd: mc12xx-i2c: rtsx_pcr: ti-ssp: Remove redundant dev_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 08:49:34 +0000 (14:19 +0530)
committerLee Jones <lee.jones@linaro.org>
Wed, 23 Oct 2013 15:21:07 +0000 (16:21 +0100)
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mc13xxx-i2c.c
drivers/mfd/rtsx_pcr.c
drivers/mfd/ti-ssp.c

index f745e27ee874a469e734cebd2757542388a0d10d..898bd335cd8ee99d7d8a2c233ef455801941ff30 100644 (file)
@@ -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;
        }
 
index e6ae7720f9e15bd546362509bca185c7a64eb86f..11e20afbdcacb7d31e49798db6d2dfbf0504afd8 100644 (file)
@@ -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),
@@ -1209,8 +1209,6 @@ disable_msi:
                        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:
@@ -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);
 
index 1c2b994e1f6c0b0ce1e4bd346a4ff6e1e1c77e3d..71e3e0c5bf730c7e8f3423619d9a2e2acc6fa27d 100644 (file)
@@ -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;
 }