mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: vop2: Use devm_clk_get_optional() in vop2_extend_clk_init()
Silence warning print if didn't have a clock reference in the DT. Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com> Change-Id: I1e6276950e6e582a424daec5b46e51d08d5fe05a
This commit is contained in:
@@ -3993,13 +3993,16 @@ static int vop2_extend_clk_init(struct vop2 *vop2)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(extend_clk_name); i++) {
|
||||
clk = devm_clk_get(drm_dev->dev, extend_clk_name[i]);
|
||||
clk = devm_clk_get_optional(drm_dev->dev, extend_clk_name[i]);
|
||||
if (IS_ERR(clk)) {
|
||||
dev_warn(drm_dev->dev, "failed to get %s: %ld\n",
|
||||
extend_clk_name[i], PTR_ERR(clk));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!clk)
|
||||
continue;
|
||||
|
||||
extend_pll = devm_kzalloc(drm_dev->dev, sizeof(*extend_pll), GFP_KERNEL);
|
||||
if (!extend_pll)
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user