File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2074,6 +2074,10 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
2074
2074
2075
2075
if (have_full_constraints ()) {
2076
2076
r = dummy_regulator_rdev ;
2077
+ if (!r ) {
2078
+ ret = - EPROBE_DEFER ;
2079
+ goto out ;
2080
+ }
2077
2081
get_device (& r -> dev );
2078
2082
} else {
2079
2083
dev_err (dev , "Failed to resolve %s-supply for %s\n" ,
@@ -2091,6 +2095,10 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
2091
2095
goto out ;
2092
2096
}
2093
2097
r = dummy_regulator_rdev ;
2098
+ if (!r ) {
2099
+ ret = - EPROBE_DEFER ;
2100
+ goto out ;
2101
+ }
2094
2102
get_device (& r -> dev );
2095
2103
}
2096
2104
@@ -2219,8 +2227,10 @@ struct regulator *_regulator_get_common(struct regulator_dev *rdev, struct devic
2219
2227
* enabled, even if it isn't hooked up, and just
2220
2228
* provide a dummy.
2221
2229
*/
2222
- dev_warn (dev , "supply %s not found, using dummy regulator\n" , id );
2223
2230
rdev = dummy_regulator_rdev ;
2231
+ if (!rdev )
2232
+ return ERR_PTR (- EPROBE_DEFER );
2233
+ dev_warn (dev , "supply %s not found, using dummy regulator\n" , id );
2224
2234
get_device (& rdev -> dev );
2225
2235
break ;
2226
2236
You can’t perform that action at this time.
0 commit comments