Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dfb85ba1 authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c517d838
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment