[PATCH v2] ath10k: sdio: remove redundant check in for loop

Kalle Valo kvalo at codeaurora.org
Fri Nov 6 01:36:00 EST 2020

Alex Dewar <alex.dewar90 at gmail.com> wrote:

> The for loop checks whether cur_section is NULL on every iteration, but
> we know it can never be NULL as there is another check towards the
> bottom of the loop body. Refactor to avoid this unnecessary check.
> Also, increment the variable i inline for clarity
> Addresses-Coverity: 1496984 ("Null pointer dereferences)
> Suggested-by: Saeed Mahameed <saeedm at nvidia.com>
> Signed-off-by: Alex Dewar <alex.dewar90 at gmail.com>
> Signed-off-by: Kalle Valo <kvalo at codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

dbeb101d28eb ath10k: sdio: remove redundant check in for loop



More information about the ath10k mailing list