From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Xichao Zhao <zhao.xichao@vivo.com>,
david.rhodes@cirrus.com, lgirdwood@gmail.com, broonie@kernel.org,
perex@perex.cz, tiwai@suse.com
Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: cs48l32: Use PTR_ERR_OR_ZERO() to simplify code
Date: Fri, 8 Aug 2025 10:46:35 +0100 [thread overview]
Message-ID: <c29fa4d5-ccf7-4143-961c-a2018b9aa25c@opensource.cirrus.com> (raw)
In-Reply-To: <20250805090431.117114-1-zhao.xichao@vivo.com>
On 05/08/2025 10:04 am, Xichao Zhao wrote:
> Use the standard error pointer macro to shorten the code and simplify.
>
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
> sound/soc/codecs/cs48l32-tables.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/cs48l32-tables.c b/sound/soc/codecs/cs48l32-tables.c
> index 59eaa9a5029f..8ff3652a010e 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);
> }
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
next prev parent reply other threads:[~2025-08-08 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 9:04 Xichao Zhao
2025-08-08 9:46 ` Richard Fitzgerald [this message]
2025-08-12 11:04 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c29fa4d5-ccf7-4143-961c-a2018b9aa25c@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=zhao.xichao@vivo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®