[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d60473d-be8f-e2dc-2ce9-bc0b9056e4b4@redhat.com>
Date: Tue, 15 Feb 2022 23:09:16 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: Douglas Anderson <dianders@...omium.org>,
dri-devel@...ts.freedesktop.org
Cc: Daniel Vetter <daniel@...ll.ch>, robert.foss@...aro.org,
lschyi@...omium.org, Sam Ravnborg <sam@...nborg.org>,
jjsu@...omium.org, Andrzej Hajda <andrzej.hajda@...el.com>,
David Airlie <airlied@...ux.ie>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Jonas Karlman <jonas@...boo.se>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Neil Armstrong <narmstrong@...libre.com>,
Thierry Reding <thierry.reding@...il.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] drm: Plumb debugfs_init through to panels
Hello Doug,
On 2/5/22 01:13, Douglas Anderson wrote:
[snip]
> +static void panel_bridge_debugfs_init(struct drm_bridge *bridge,
> + struct dentry *root)
> +{
> + struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
> + struct drm_panel *panel = panel_bridge->panel;
> +
> + root = debugfs_create_dir("panel", root);
This could return a ERR_PTR(-errno) if the function doesn't succeed.
I noticed that most kernel code doesn't check the return value though...
> + if (panel->funcs->debugfs_init)
Probably if (!(IS_ERR(root) && panel->funcs->debugfs_init) ?
> + panel->funcs->debugfs_init(panel, root);
> +}
[snip]
> @@ -436,6 +436,9 @@ void drm_debugfs_connector_add(struct drm_connector *connector)
> /* vrr range */
> debugfs_create_file("vrr_range", S_IRUGO, root, connector,
> &vrr_range_fops);
Same here, wonder if the return value should be checked.
I leave it to you to decide, but regardless of that the patch looks good to me.
Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists