diff mbox

drm: fixes when bridge mode_fixup is null.

Message ID 1455102200-2752-1-git-send-email-palminha@synopsys.com (mailing list archive)
State New, archived
Headers show

Commit Message

Carlos Palminha Feb. 10, 2016, 11:03 a.m. UTC
Avoid drivers to copy/past code to implement functions that will only return
true.
---
 drivers/gpu/drm/drm_bridge.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.5.0

Comments

Fabio Estevam Feb. 10, 2016, 11:11 a.m. UTC | #1
On Wed, Feb 10, 2016 at 9:03 AM, Carlos Palminha
<CARLOS.PALMINHA@synopsys.com> wrote:
> Avoid drivers to copy/past code to implement functions that will only return
> true.
> ---

You missed your Signed-off-by.
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index bd93453..4133e51 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -161,6 +161,8 @@  bool drm_bridge_mode_fixup(struct drm_bridge *bridge,

 	if (bridge->funcs->mode_fixup)
 		ret = bridge->funcs->mode_fixup(bridge, mode, adjusted_mode);
+	else
+		return true;

 	ret = ret && drm_bridge_mode_fixup(bridge->next, mode, adjusted_mode);