All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: dri-devel@lists.freedesktop.org, wsa+renesas@sang-engineering.com
Subject: Re: [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call
Date: Tue, 10 Nov 2026 11:51:58 +0000	[thread overview]
Message-ID: <sashiko-outbox-206960@kernel.org> (raw)
In-Reply-To: <20261110114622.229608-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm: renesas: rz-du: null pointer dereference in
  rzg2l_mipi_dsi_probe() [1]
--

commit dcaf0e503b70614276db2fd071bf963a09140504
Author: John Madieu <john.madieu.xa@bp.renesas.com>

drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call

This commit removes a redundant platform_set_drvdata() call in
rzg2l_mipi_dsi_probe().

> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> index 5b257f5adf06c..985d6e02203c1 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -1576,8 +1576,6 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
>  	if (!dsi->dcs_buf_virt)
>  		return -ENOMEM;
>  
> -	platform_set_drvdata(pdev, dsi);
> -
>  	ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
>  	if (ret)
>  		return ret;

[Severity: High]
This problem wasn't introduced by this patch, but can a NULL pointer
dereference occur in rzg2l_mipi_dsi_probe() [1] if the driver is
manually bound via sysfs without matching device tree data?

drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c:rzg2l_mipi_dsi_probe() {
	...
	dsi->info = of_device_get_match_data(&pdev->dev);
	...
	ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
	...
	ret = dsi->info->dphy_init(dsi, 80000000ULL * MILLI);
	...
}

of_device_get_match_data() returns NULL when no match is found, and
dsi->info is later dereferenced without a NULL check in
rzg2l_mipi_dsi_pwrrdy_init() and when calling dsi->info->dphy_init().

[1] https://sashiko.dev/#/bug/linux-14b243a7-c808-4384-b0dc-3416dc888b2a

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110114622.229608-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=1

  reply	other threads:[~2026-11-10 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 11:46 [PATCH] drm: renesas: rz-du: mipi-dsi: Drop duplicate platform_set_drvdata() call Prabhakar
2026-11-10 11:51 ` sashiko-bot [this message]
2026-11-10 11:59 ` Biju Das
2026-11-10 12:21   ` Lad, Prabhakar
  -- strict thread matches above, loose matches on Subject: below --
2026-04-25  2:28 [PATCH] drm: renesas: rz-du: mipi-dsi: drop " John Madieu
2026-04-25  6:39 ` Biju Das
2026-04-25 10:47   ` John Madieu

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=sashiko-outbox-206960@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.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 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.