lkml.org 
[lkml]   [2017]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] iio: magnetometer: ak8974: remove redundant zero timeout check
On Wed, Jan 11, 2017 at 6:49 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
>
> 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@canonical.com>

Clever Coverity scan.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2017-01-12 00:12    [W:0.086 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site