Re: [PATCH] regulator: max8660: fix assignment of pdata to data that becomes dead

2015-04-08 Thread Mark Brown
On Tue, Apr 07, 2015 at 11:06:46PM +0100, Colin King wrote: > From: Colin Ian King > > pdata is assigned to &pdata_of, however, pdata_of becomes dead (when it > goes out of scope) so pdata effectively becomes a dead pointer to the > out of scope object. This is detected by static analysis: Appl

[PATCH] regulator: max8660: fix assignment of pdata to data that becomes dead

2015-04-07 Thread Colin King
From: Colin Ian King pdata is assigned to &pdata_of, however, pdata_of becomes dead (when it goes out of scope) so pdata effectively becomes a dead pointer to the out of scope object. This is detected by static analysis: [drivers/regulator/max8660.c:411]: (error) Dead pointer usage. Pointer '