From: Xin Ji <xji@analogixsemi.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: bliang@analogixsemi.com, dri-devel@lists.freedesktop.org
Subject: Re: [bug report] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP
Date: Thu, 18 Nov 2021 10:54:00 +0800 [thread overview]
Message-ID: <20211118025400.GA3778782@anxtwsw-Precision-3640-Tower> (raw)
In-Reply-To: <20211117134720.GA6968@kili>
On Wed, Nov 17, 2021 at 04:47:20PM +0300, Dan Carpenter wrote:
> Hello Xin Ji,
>
> The patch 8bdfc5dae4e3: "drm/bridge: anx7625: Add anx7625 MIPI
> DSI/DPI to DP" from Sep 18, 2020, leads to the following Smatch
> static checker warning:
>
> drivers/gpu/drm/bridge/analogix/anx7625.c:1050 anx7625_init_gpio()
> warn: 'platform->pdata.gpio_p_on' could be an error pointer
>
> drivers/gpu/drm/bridge/analogix/anx7625.c:1050 anx7625_init_gpio()
> warn: 'platform->pdata.gpio_reset' could be an error pointer
Hi Dan Carpenter, thanks for the report, I'll upstream a patch to fix it.
Thanks,
Xin
>
> drivers/gpu/drm/bridge/analogix/anx7625.c
> 1037 static void anx7625_init_gpio(struct anx7625_data *platform)
> 1038 {
> 1039 struct device *dev = &platform->client->dev;
> 1040
> 1041 DRM_DEV_DEBUG_DRIVER(dev, "init gpio\n");
> 1042
> 1043 /* Gpio for chip power enable */
> 1044 platform->pdata.gpio_p_on =
> 1045 devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
> 1046 /* Gpio for chip reset */
> 1047 platform->pdata.gpio_reset =
> 1048 devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
> 1049
> --> 1050 if (platform->pdata.gpio_p_on && platform->pdata.gpio_reset) {
> 1051 platform->pdata.low_power_mode = 1;
> 1052 DRM_DEV_DEBUG_DRIVER(dev, "low power mode, pon %d, reset %d.\n",
> 1053 desc_to_gpio(platform->pdata.gpio_p_on),
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> 1054 desc_to_gpio(platform->pdata.gpio_reset));
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> This will crash here but only when there is an error and debugging is
> enabled.
>
> 1055 } else {
> 1056 platform->pdata.low_power_mode = 0;
> 1057 DRM_DEV_DEBUG_DRIVER(dev, "not low power mode.\n");
> 1058 }
> 1059 }
>
> regards,
> dan carpenter
prev parent reply other threads:[~2021-11-18 2:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 13:47 [bug report] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP Dan Carpenter
2021-11-18 2:54 ` Xin Ji [this message]
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=20211118025400.GA3778782@anxtwsw-Precision-3640-Tower \
--to=xji@analogixsemi.com \
--cc=bliang@analogixsemi.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
/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.