Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Jonas Karlman <jonas@kwiboo.se>
Cc: linux-rockchip@lists.infradead.org
Subject: [bug report] drm/rockchip: dw_hdmi: Propagate bus format to display driver
Date: Thu, 13 Aug 2026 10:08:39 +0300	[thread overview]
Message-ID: <an1td9BdKRo2JUDy@stanley.mountain> (raw)

Hello Jonas Karlman,

Commit dc70272cc184 ("drm/rockchip: dw_hdmi: Propagate bus format to
display driver") from May 18, 2026 (linux-next), leads to the
following Smatch static checker warning:

	drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:292 dw_hdmi_rockchip_get_bus_format()
	error: 'bridge_state' dereferencing possible ERR_PTR()

drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
    278 static u32 dw_hdmi_rockchip_get_bus_format(struct drm_encoder *encoder,
    279                                            struct drm_connector_state *conn_state)
    280 {
    281         struct drm_bridge *bridge __free(drm_bridge_put) = NULL;
    282         struct drm_bridge_state *bridge_state;
    283 
    284         bridge = drm_bridge_chain_get_first_bridge(encoder);
    285         if (!bridge)
    286                 return 0;
    287 
    288         bridge_state = drm_atomic_get_bridge_state(conn_state->state, bridge);
    289         if (!bridge_state)

This should be if (IS_ERR(bridge_state)).

    290                 return 0;
    291 
--> 292         if (bridge_state->input_bus_cfg.format != MEDIA_BUS_FMT_FIXED)
    293                 return bridge_state->input_bus_cfg.format;
    294 
    295         return bridge_state->output_bus_cfg.format;
    296 }

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

             reply	other threads:[~2026-08-13  7:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  7:08 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-10 10:04 [bug report] drm/rockchip: dw_hdmi: Propagate bus format to display driver Dan Carpenter
2026-07-10 10:09 ` Jonas Karlman

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=an1td9BdKRo2JUDy@stanley.mountain \
    --to=error27@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-rockchip@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox