Messages in this thread | | | From | Axel Lin <> | Date | Tue, 21 Aug 2012 09:21:03 +0800 | Subject | Re: [PATCH] regulator: max8907: fix compile error when !CONFIG_OF |
| |
> + > +static inline struct regulator_init_data *match_init_data(int index) > +{ > + return NULL; > +} > +
Now match_init_data() returns NULL if !CONFIG_OF, so idata may be NULL.
Then I think we may hit NULL pointer dereference here:
switch (pmic->desc[i].id) { case MAX8907_MBATT: mbatt_rail_name = idata->constraints.name; break;
Regards, Axel
| |