Line 852 DRM_ERROR is redundant because memory alloc already prints an error when failed. Signed-off-by: Bernard Zhao <bernard@xxxxxxxx> --- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c index 00e87c290796..8491d8267f07 100644 --- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c +++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c @@ -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; -- 2.29.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel