Re: [PATCH] iio: magnetometer: ak8974: remove redundant zero timeout check
From: Linus Walleij
Date: Wed Jan 11 2017 - 18:11:45 EST
On Wed, Jan 11, 2017 at 6:49 PM, Colin King <colin.king@xxxxxxxxxxxxx> wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> At the end of the delay loop timeout will always be zero
> and hence the check for !timeout will always be true. Remove
> the redundant check and the redundant return 0 at the end of
> the function.
>
> Fixes CoverityScan CID#1357168 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Clever Coverity scan.
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij