From: Bibby Hsieh Date: Wed, 3 Oct 2018 03:41:51 +0000 (+0800) Subject: drm/mediatek: add a error return value when clock driver has been prepared X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=84dacb9cad2804a9f5434b775ccea6aa5d9fc6ca;p=openwrt%2Fstaging%2Fblogic.git drm/mediatek: add a error return value when clock driver has been prepared DRM driver get the comp->clk by of_clk_get(), we only assign NULL to comp->clk when error happened, but do not return the error number. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu --- diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c index ff974d82a4a6..54ca794db3e9 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c @@ -294,7 +294,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node, comp->irq = of_irq_get(node, 0); comp->clk = of_clk_get(node, 0); if (IS_ERR(comp->clk)) - comp->clk = NULL; + return PTR_ERR(comp->clk); /* Only DMA capable components need the LARB property */ comp->larb_dev = NULL;