From: Xichao Zhao Date: Tue, 5 Aug 2025 09:04:31 +0000 (+0800) Subject: ASoC: cs48l32: Use PTR_ERR_OR_ZERO() to simplify code X-Git-Tag: v6.18-rc1~135^2~13^2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3059067fd3378a5454e7928c08d20bf3ef186760;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20250805090431.117114-1-zhao.xichao@vivo.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/cs48l32-tables.c b/sound/soc/codecs/cs48l32-tables.c index 59eaa9a5029f6..8ff3652a010eb 100644 --- a/sound/soc/codecs/cs48l32-tables.c +++ b/sound/soc/codecs/cs48l32-tables.c @@ -533,8 +533,6 @@ static const struct regmap_config cs48l32_regmap = { int cs48l32_create_regmap(struct spi_device *spi, struct cs48l32 *cs48l32) { cs48l32->regmap = devm_regmap_init_spi(spi, &cs48l32_regmap); - if (IS_ERR(cs48l32->regmap)) - return PTR_ERR(cs48l32->regmap); - return 0; + return PTR_ERR_OR_ZERO(cs48l32->regmap); }