[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <44218b05-7a3e-2e22-d836-d7eb22d89d45@suse.de>
Date: Mon, 2 Nov 2020 09:20:08 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Bernard Zhao <bernard@...o.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: Re: [PATCH] gpu/drm: delete same check in if condition
Hi
Am 02.11.20 um 04:07 schrieb Bernard Zhao:
> In function drm_bridge_connector_get_modes_edid, drm_edid_is_valid
> will check weather (!edid), no need to check again in the if
> branch.
>
> Signed-off-by: Bernard Zhao <bernard@...o.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>
Thanks! I'll add the patch to drm-misc-next.
Best regards
Thomas
> ---
> drivers/gpu/drm/drm_bridge_connector.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c
> index a58cbde59c34..791379816837 100644
> --- a/drivers/gpu/drm/drm_bridge_connector.c
> +++ b/drivers/gpu/drm/drm_bridge_connector.c
> @@ -241,7 +241,7 @@ static int drm_bridge_connector_get_modes_edid(struct drm_connector *connector,
> goto no_edid;
>
> edid = bridge->funcs->get_edid(bridge, connector);
> - if (!edid || !drm_edid_is_valid(edid)) {
> + if (!drm_edid_is_valid(edid)) {
> kfree(edid);
> goto no_edid;
> }
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Download attachment "OpenPGP_0x680DC11D530B7A23.asc" of type "application/pgp-keys" (4202 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists