sound: rt5677: Cannot test unsigned for being negative

In rt5677_bic_or the call to rt5677_i2c_read returns an int so old
should also be an int to receive that value and then be able to test it
for being negative which would indicate an error.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2025-08-12 11:36:53 +01:00
committed by Tom Rini
parent 544bf0aa59
commit da938a4254

View File

@@ -94,8 +94,8 @@ static int rt5677_i2c_write(struct rt5677_priv *priv, uint reg, uint data)
static int rt5677_bic_or(struct rt5677_priv *priv, uint reg, uint bic,
uint set)
{
uint old, new_value;
int ret;
uint new_value;
int old, ret;
old = rt5677_i2c_read(priv, reg);
if (old < 0)