mfd: lpc_sch: Don't call mfd_remove_devices()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Nov 2014 17:29:23 +0000 (19:29 +0200)
committerLee Jones <lee.jones@linaro.org>
Tue, 25 Nov 2014 16:18:52 +0000 (16:18 +0000)
MFD core already cares about failing registration. It will remove successfully
registered devices in case of error. Thus, no need to repeatedly call
mfd_remove_devices().

Fixes: 5829e9b64e65 (mfd: lpc_sch: Accomodate partial population of the MFD devices)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/lpc_sch.c

index c980da479a358ac810929bf07737a1eb516516d1..5c38df35a84d0e649882304811874e26f045ddda 100644 (file)
@@ -193,11 +193,7 @@ static int lpc_sch_probe(struct pci_dev *dev, const struct pci_device_id *id)
                return -ENODEV;
        }
 
-       ret = mfd_add_devices(&dev->dev, 0, lpc_sch_cells, cells, NULL, 0, NULL);
-       if (ret)
-               mfd_remove_devices(&dev->dev);
-
-       return ret;
+       return mfd_add_devices(&dev->dev, 0, lpc_sch_cells, cells, NULL, 0, NULL);
 }
 
 static void lpc_sch_remove(struct pci_dev *dev)