From: Colin Ian King Date: Tue, 7 Apr 2015 22:06:46 +0000 (+0100) Subject: regulator: max8660: fix assignment of pdata to data that becomes dead X-Git-Tag: omap-for-v4.1/fixes-rc1~175^2~2^5~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfb85ba1140ab649f6f0bf3e502ac37c0f69dbcb;p=pandora-kernel.git regulator: max8660: fix assignment of pdata to data that becomes dead 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 'pdata' is dead if it has been assigned '&pdata_of' at line 404. Move declaration of pdata_of so it is always in scope. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown --- Reading git-diff-tree failed