aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6cb9d399aff..e70e15c4aa2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -985,9 +985,8 @@ static int set_supply(struct regulator_dev *rdev,
985 rdev_info(rdev, "supplied by %s\n", rdev_get_name(supply_rdev)); 985 rdev_info(rdev, "supplied by %s\n", rdev_get_name(supply_rdev));
986 986
987 rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY"); 987 rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY");
988 if (IS_ERR(rdev->supply)) { 988 if (rdev->supply == NULL) {
989 err = PTR_ERR(rdev->supply); 989 err = -ENOMEM;
990 rdev->supply = NULL;
991 return err; 990 return err;
992 } 991 }
993 992