linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge/analogix: remove redundant when devm_kzalloc failed
@ 2021-02-02 11:56 Bernard Zhao
  2021-02-04 12:11 ` Robert Foss
  0 siblings, 1 reply; 2+ messages in thread
From: Bernard Zhao @ 2021-02-02 11:56 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, David Airlie, Daniel Vetter, Tomi Valkeinen,
	Sam Ravnborg, Andy Yan, Marek Szyprowski, Bernard Zhao,
	Joe Perches, dri-devel, linux-kernel
  Cc: opensource.kernel

Line 1590 DRM_ERROR is redundant because devm_kzalloc() already
prints an error.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index aa1bb86293fd..8f6258eb9960 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1586,10 +1586,8 @@ static int analogix_dp_create_bridge(struct drm_device *drm_dev,
 	int ret;
 
 	bridge = devm_kzalloc(drm_dev->dev, sizeof(*bridge), GFP_KERNEL);
-	if (!bridge) {
-		DRM_ERROR("failed to allocate for drm bridge\n");
+	if (!bridge)
 		return -ENOMEM;
-	}
 
 	dp->bridge = bridge;
 
-- 
2.29.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-04 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 11:56 [PATCH] drm/bridge/analogix: remove redundant when devm_kzalloc failed Bernard Zhao
2021-02-04 12:11 ` Robert Foss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).