diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index cb62be63caed..2f14c16f58c3 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2080,6 +2080,10 @@ out: scrub: device_unregister(&rdev->dev); + /* device core frees rdev */ + rdev = ERR_PTR(ret); + goto out; + clean: kfree(rdev); rdev = ERR_PTR(ret); |