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

Commit 51e846ca authored by Abinaya P's avatar Abinaya P Committed by Gerrit - the friendly Code Review server
Browse files

drivers: leds-qpnp-flash: fix issues raised by static analyser



Fix the below mentioned issues raised by static analyser:
1. use of uninitialized values in the function.

a) 'root' may be uninitialized when it reaches line:2599. Hence,
modify the error path accordingly.
b) 'j' may be uninitialized when it reaches the for loop in line:
2593 and may hold garbage value due to which the condition in the
for loop may become true and this may lead to erroneous results.
Hence, initialize it to -1 so that the error path will be handled
correctly.

2. Comparison of unsigned value against 0 is always false.

Change-Id: I56950779d221acf3572cba70a64874299f127004
Signed-off-by: default avatarAbinaya P <abinayap@codeaurora.org>
parent 0940fb6a
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