From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v1 3/5] ASoC: codec: pcm1681: Enable system clock before regmap access
Date: Mon, 07 Sep 2026 18:17:00 +0000 [thread overview]
Message-ID: <20260907181700.D89071F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907-nord-asoc-driver-support-v1-3-997d3b20cf43@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Casting clk_disable_unprepare to (void (*)(void *)) causes a fatal Control-Flow Integrity (kCFI) violation on execution.
--
commit e63e11f267cb1c89c4801467a10adb890c3c4c31
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
ASoC: codec: pcm1681: Enable system clock before regmap access
This commit adds optional clock support to the PCM1681 driver by acquiring
the "sck" clock and enabling it during probe. It registers a managed cleanup
action to disable it during device removal or probe failure.
> diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
> index 60fdbe5c4e054..cfe549176d14f 100644
> --- a/sound/soc/codecs/pcm1681.c
> +++ b/sound/soc/codecs/pcm1681.c
[ ... ]
> @@ -311,6 +313,22 @@ static int pcm1681_i2c_probe(struct i2c_client *client)
> if (!priv)
> return -ENOMEM;
>
> + priv->sclk = devm_clk_get_optional(&client->dev, "sck");
> + if (IS_ERR(priv->sclk))
> + return dev_err_probe(&client->dev, PTR_ERR(priv->sclk),
> + "Failed to get sck\n");
> +
> + ret = clk_prepare_enable(priv->sclk);
> + if (ret)
> + return dev_err_probe(&client->dev, ret,
> + "Failed to enable sck\n");
> +
> + ret = devm_add_action_or_reset(&client->dev,
> + (void (*)(void *))clk_disable_unprepare,
> + priv->sclk);
[Severity: High]
Does casting clk_disable_unprepare to (void (*)(void *)) cause a fatal
Control-Flow Integrity (kCFI) violation on execution?
When the kernel is compiled with Clang's kCFI (CONFIG_CFI_CLANG), calling a
function through a pointer with a mismatched signature (from
void (*)(struct clk *) to void (*)(void *)) results in a type hash mismatch.
This triggers an immediate kernel panic when the devres API executes this
callback during driver unbind, remove, or on probe failure after the clock
is enabled.
> + if (ret)
> + return ret;
> +
> priv->regmap = devm_regmap_init_i2c(client, &pcm1681_regmap);
> if (IS_ERR(priv->regmap)) {
> ret = PTR_ERR(priv->regmap);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-nord-asoc-driver-support-v1-0-997d3b20cf43@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-09-07 18:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 18:09 [PATCH 0/5] ASoC: qcom: Add Nord Ride audio support Mohammad Rafi Shaik
2026-09-07 18:09 ` [PATCH v1 1/5] ASoC: codec: adau1977-i2c: Add OF device match table Mohammad Rafi Shaik
2026-09-07 18:20 ` sashiko-bot
2026-09-09 14:44 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 2/5] ASoC: dt-bindings: ti,pcm1681: Document the optional SCK clock Mohammad Rafi Shaik
2026-09-09 14:50 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 3/5] ASoC: codec: pcm1681: Enable system clock before regmap access Mohammad Rafi Shaik
2026-09-07 18:17 ` sashiko-bot [this message]
2026-09-08 17:26 ` Mark Brown
2026-09-09 12:36 ` Mohammad Rafi Shaik
2026-09-09 12:39 ` Mark Brown
2026-09-09 12:45 ` Mohammad Rafi Shaik
2026-09-09 14:59 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 4/5] ASoC: dt-bindings: qcom,sm8250: Add Nord Ride sound card Mohammad Rafi Shaik
2026-09-07 18:20 ` sashiko-bot
2026-09-09 14:54 ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 5/5] ASoC: qcom: sc8280xp: Add Nord Ride sound card support Mohammad Rafi Shaik
2026-09-09 15:37 ` Shawn Guo
2026-09-09 14:46 ` [PATCH 0/5] ASoC: qcom: Add Nord Ride audio support Shawn Guo
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=20260907181700.D89071F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.