lkml.org 
[lkml]   [2012]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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


\
 
 \ /
  Last update: 2012-08-21 04:01    [W:0.291 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site