wm8350-regulator: fix wm8350_register_regulator error handling
[linux-2.6.git] / drivers / regulator / wm8350-regulator.c
index 723cd1f..0e6ed7d 100644 (file)
@@ -1495,7 +1495,7 @@ int wm8350_register_regulator(struct wm8350 *wm8350, int reg,
        if (ret != 0) {
                dev_err(wm8350->dev, "Failed to register regulator %d: %d\n",
                        reg, ret);
-               platform_device_del(pdev);
+               platform_device_put(pdev);
                wm8350->pmic.pdev[reg] = NULL;
        }