iio: adc: stmpe-adc: Fix wait_for_completion_timeout return value check
stable inclusion from stable-v5.10.122 commit 43823ceb26e6ea12ea1284a2e130f8a4ac886ff7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5W6OE Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=43823ceb26e6ea12ea1284a2e130f8a4ac886ff7 -------------------------------- [ Upstream commit d345b232 ] wait_for_completion_timeout() returns unsigned long not long. it returns 0 if timed out, and positive if completed. The check for <= 0 is ambiguous and should be == 0 here indicating timeout which is the only error case Fixes: e813dde6 ("iio: stmpe-adc: Use wait_for_completion_timeout") Signed-off-by: NMiaoqian Lin <linmq006@gmail.com> Reviewed-by: NPhilippe Schenker <philippe.schenker@toradex.com> Link: https://lore.kernel.org/r/20220412065150.14486-1-linmq006@gmail.comSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
Showing
想要评论请 注册 或 登录