[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF+7xWkbB3N5BA=mJNxfLLuZhgtLWG2ugdbF5a+WoBiWa9mwQQ@mail.gmail.com>
Date: Tue, 21 Aug 2012 09:21:03 +0800
From: Axel Lin <axel.lin@...il.com>
To: Stephen Warren <swarren@...dotorg.org>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org,
Gyungoh Yoo <jack.yoo@...im-ic.com>,
Laxman Dewangan <ldewangan@...dia.com>,
Stephen Warren <swarren@...dia.com>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists