diff options
| -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: | |||
| 2080 | 2080 | ||
| 2081 | scrub: | 2081 | scrub: |
| 2082 | device_unregister(&rdev->dev); | 2082 | device_unregister(&rdev->dev); |
| 2083 | /* device core frees rdev */ | ||
| 2084 | rdev = ERR_PTR(ret); | ||
| 2085 | goto out; | ||
| 2086 | |||
| 2083 | clean: | 2087 | clean: |
| 2084 | kfree(rdev); | 2088 | kfree(rdev); |
| 2085 | rdev = ERR_PTR(ret); | 2089 | rdev = ERR_PTR(ret); |
