Thread (8 messages) flat view 8 messages, 3 authors, 2016-08-31

[PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found

From: Maxime Ripard <hidden>
Date: 2016-08-31 16:42:02
Also in: dri-devel, lkml

On Wed, Aug 31, 2016 at 07:09:23PM +0800, Chen-Yu Tsai wrote:
quoted
quoted
quoted
      sun4i_tcon_channel_disable(tcon, 0);

-     if (!IS_ERR(encoder->bridge))
-             drm_bridge_disable(encoder->bridge);
+     drm_bridge_disable(encoder->bridge);
I'd rather keep those changes, it makes it obvious that it's something
optionnal, that can be set to NULL.
OK.
What about having a comment instead? Saves an extra branch condition,
while still showing that it's optional.
I'm not sure we have to worry about an extra branch condition, but
yeah, that works for me.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160831/05fc9ca6/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help