mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
pinctrl: aspeed: fix regmap error handling
The newly added aspeed driver tries to check for a negative return value from a pinctrl function, but stores the intermediate value in a 'bool' variable, which cannot work: drivers/pinctrl/aspeed/pinctrl-aspeed.c: In function 'aspeed_sig_expr_set': drivers/pinctrl/aspeed/pinctrl-aspeed.c:192:11: error: comparison of constant '0' with boolean expression is always false [-Werror=bool-compare] This slightly reworks the logic to use an explicit comparison with zero before assigning to the temporary variable. Reported-by: Colin King <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Joel Stanley <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
03e9888f95
commit
5595603526
1 changed files with 3 additions and 3 deletions
|
|
@ -187,10 +187,10 @@ static bool aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
|
|||
continue;
|
||||
|
||||
ret = regmap_update_bits(map, desc->reg, desc->mask,
|
||||
pattern << __ffs(desc->mask));
|
||||
pattern << __ffs(desc->mask)) == 0;
|
||||
|
||||
if (ret < 0)
|
||||
return false;
|
||||
if (!ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return aspeed_sig_expr_eval(expr, enable, map);
|
||||
|
|
|
|||
Loading…
Reference in a new issue