ASoC: codecs: wcd938x: fix boolreturn.cocci warning

Return statements in functions returning bool should use true/false
instead of 1/0.

Fix the following coccicheck warning:
./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in
function 'wcd938x_volatile_register' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Yang Li 2021-06-16 10:45:35 +08:00 committed by Mark Brown
parent 3325b1515a
commit 83bd5c53eb
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -1186,7 +1186,7 @@ static bool wcd938x_writeable_register(struct device *dev, unsigned int reg)
static bool wcd938x_volatile_register(struct device *dev, unsigned int reg)
{
if (reg <= WCD938X_BASE_ADDRESS)
return 0;
return false;
if (reg == WCD938X_DIGITAL_SWR_TX_CLK_RATE)
return true;