summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-01-16 17:57:58 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-28 15:42:37 +0100
commit8bff309a478f67c1702e6833f11753495a21ea15 (patch)
tree89bb83d657f18cbcebf27e4cd69a669ce176eff5 /sound
parentbfcb4626806ead81ff642ba09252db6328bdb648 (diff)
driver core: platform: fix u32 greater or equal to zero comparison
[ Upstream commit 0707cfa5c3ef58effb143db9db6d6e20503f9dec ] Currently the check that a u32 variable i is >= 0 is always true because the unsigned variable will never be negative, causing the loop to run forever. Fix this by changing the pre-decrement check to a zero check on i followed by a decrement of i. Addresses-Coverity: ("Unsigned compared against 0") Fixes: 39cc539f90d0 ("driver core: platform: Prevent resouce overflow from causing infinite loops") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20200116175758.88396-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions