drm/hisilicon: remove redundant when devm_kzalloc failed
Subsystems (3)
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.
Signed-off-by Bernard Zhao <[email protected]>
--- 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
@@ -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