]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/bridge: adv7511: Remove a redundant check on existence of bridge->encoder
authorSui Jingfeng <sui.jingfeng@linux.dev>
Mon, 13 May 2024 15:31:03 +0000 (23:31 +0800)
committerRobert Foss <rfoss@kernel.org>
Mon, 13 May 2024 16:31:05 +0000 (18:31 +0200)
commit41e6ed85e4575bba9d62fd03e9b555f9eaa2c241
treedc49ef0ed688d109f7d36dba9a117c2bc9defb2b
parent8761a39e3f9d9f41a593af2fce1ba41537c35b83
drm/bridge: adv7511: Remove a redundant check on existence of bridge->encoder

In the adv7511_connector_init() function, the check on the existence of
bridge->encoder is not necessary. As it has already been checked in the
drm_bridge_attach() which happens prior to the adv7511_bridge_attach()
get called. Also note that the adv7511_connector_init() is only called by
adv7511_bridge_attach(). Hence, it is guaranteed that the .encoder member
of the drm_bridge instance is not NULL when adv7511_connector_init() get
called.

Remove the redundant checking codes "if (!bridge->encoder) { ... }".

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-7-sui.jingfeng@linux.dev
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c