Skip to contentSkip to conversation

drm/hisilicon: remove redundant when devm_kzalloc failed

PATCH New Bernard Zhao 1 participant 1 message Feb 2, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/hisilicon: remove redundant when devm_kzalloc failed

Line 852 DRM_ERROR is redundant because memory alloc already prints an error when failed.

---
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c +2 -3
index 00e87c290796..8491d8267f07 100644
@@ -852,10 +852,9 @@ static int dsi_probe(struct platform_device *pdev)
 	int ret;
 
 	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
-	if (!data) {
-		DRM_ERROR("failed to allocate dsi data.\n");
+	if (!data)
 		return -ENOMEM;
-	}
+
 	dsi = &data->dsi;
 	ctx = &data->ctx;
 	dsi->ctx = ctx;
Signature · 1 line
2.29.0