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:
Abinaya P <abinayap@codeaurora.org>
Loading
Please register or sign in to comment