Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: lpc_sch: Don't call mfd_remove_devices()

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>

authored by

Andy Shevchenko and committed by
Lee Jones
bde3e706 1753b40f

+1 -5
+1 -5
drivers/mfd/lpc_sch.c
··· 193 193 return -ENODEV; 194 194 } 195 195 196 - ret = mfd_add_devices(&dev->dev, 0, lpc_sch_cells, cells, NULL, 0, NULL); 197 - if (ret) 198 - mfd_remove_devices(&dev->dev); 199 - 200 - return ret; 196 + return mfd_add_devices(&dev->dev, 0, lpc_sch_cells, cells, NULL, 0, NULL); 201 197 } 202 198 203 199 static void lpc_sch_remove(struct pci_dev *dev)