Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: cs48l32: Use PTR_ERR_OR_ZERO() to simplify code

Use the standard error pointer macro to shorten the code and simplify.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://patch.msgid.link/20250805090431.117114-1-zhao.xichao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Xichao Zhao and committed by
Mark Brown
3059067f 2399f3bd

+1 -3
+1 -3
sound/soc/codecs/cs48l32-tables.c
··· 533 533 int cs48l32_create_regmap(struct spi_device *spi, struct cs48l32 *cs48l32) 534 534 { 535 535 cs48l32->regmap = devm_regmap_init_spi(spi, &cs48l32_regmap); 536 - if (IS_ERR(cs48l32->regmap)) 537 - return PTR_ERR(cs48l32->regmap); 538 536 539 - return 0; 537 + return PTR_ERR_OR_ZERO(cs48l32->regmap); 540 538 }