All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Richard Acayan" <mailingradian@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 14/15] ASoC: msm8916-wcd-analog: add pm8953 codec
Date: Thu, 30 Jul 2026 18:03:19 +0000	[thread overview]
Message-ID: <20260730180319.C00B31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730174353.108023-15-mailingradian@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

New issues:
- [High] Missing NULL check for the result of `of_device_get_match_data()` before dereferencing it.
- [Low] Initialization sequence improperly writes to a status register (`CDC_A_RX_EAR_STATUS`).

Pre-existing issues:
- [High] Interrupt handlers dereference a NULL `component` pointer if triggered before the ALSA SoC component finishes initialization.
--

--- Patch [14]: [PATCH v6 14/15] ASoC: msm8916-wcd-analog: add pm8953 codec ---
commit 20f92545eb7f1109d22b0cad48d91169236a8d8d
Author: Vladimir Lypak <vladimir.lypak@gmail.com>
ASoC: msm8916-wcd-analog: add pm8953 codec

This commit adds register overrides for the PM8953 codec to the msm8916
wcd analog driver.

(Note: The standard inline patch quotation format has been altered to a
free-form summary in this report to comply with strict text recitation
policies. The issues below are presented without quoting the diff.)

[Severity: Low]
In the newly added wcd_reg_defaults_pm8953 array, there is a write of 0x10
to CDC_A_RX_EAR_STATUS. Is this intended? Since this is typically a read-only
status register, could this be a typo for a control register like
CDC_A_RX_EAR_CTL, which might lead to missing configuration?

[Severity: High]
In pm8916_wcd_analog_probe(), the return value of of_device_get_match_data()
is assigned to wcd_reg_init_data and immediately dereferenced in the loop
condition without validation. If the driver is instantiated without a matching
device tree node (for example, via a sysfs bind by name), could this lead to
a NULL pointer dereference and a kernel panic?

[Severity: High]
This is a pre-existing issue, but in the interrupt handlers
mbhc_btn_press_irq_handler() and pm8916_mbhc_switch_irq_handler(), there
is a read of priv->component followed by a call to snd_soc_component_read()
without checking if the component is fully initialized. Since the IRQs are
requested in the platform driver probe before the ALSA component probe
assigns the pointer, could a pending interrupt from the bootloader fire
immediately and cause a NULL pointer dereference?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730174353.108023-1-mailingradian@gmail.com?part=14

  reply	other threads:[~2026-07-30 18:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 17:43 [PATCH v6 00/15] SDM660 sound card and internal MI2S support Richard Acayan
2026-07-30 17:43 ` [PATCH v6 01/15] ASoC: dt-bindings: qcom,sm8250: add compatible for sdm660 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 02/15] ASoC: dt-bindings: qcom: q6dsp: add support for lpi mi2s ports 5-6 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 03/15] ASoC: dt-bindings: pm8916-wcd-analog-codec: Document pm8950/pm8953 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 04/15] ASoC: dt-bindings: pm8916-analog-codec: Add PM660L compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 05/15] ASoC: dt-bindings: msm8916-digital-codec: Add SDM660 compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 06/15] ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6 Richard Acayan
2026-07-30 18:15   ` sashiko-bot
2026-07-30 22:49   ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 07/15] ASoC: qdsp6: q6afe: add internal mi2s support Richard Acayan
2026-07-30 18:21   ` sashiko-bot
2026-07-30 22:51   ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 08/15] ASoC: qdsp6: q6afe-dai: " Richard Acayan
2026-07-30 18:06   ` sashiko-bot
2026-07-30 22:55   ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 09/15] ASoC: qdsp6: q6routing: add lpi " Richard Acayan
2026-07-30 22:57   ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 10/15] ASoC: qdsp6: common: support headphone jacks connected to lpi mi2s Richard Acayan
2026-07-30 17:43 ` [PATCH v6 11/15] ASoC: qcom: sm8250: add support for LPI_MI2S_RX_0 and LPI_MI2S_TX_3 Richard Acayan
2026-07-30 18:02   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 12/15] ASoC: qcom: sm8250: add SDM660 compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 13/15] ASoC: msm8916-wcd-analog: add pm8950 codec Richard Acayan
2026-07-30 17:59   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 14/15] ASoC: msm8916-wcd-analog: add pm8953 codec Richard Acayan
2026-07-30 18:03   ` sashiko-bot [this message]
2026-07-30 17:43 ` [PATCH v6 15/15] ASoC: msm8916-wcd-analog: add quirk for cajon 2.0 Richard Acayan
2026-07-30 18:03   ` sashiko-bot

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=20260730180319.C00B31F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mailingradian@gmail.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.