Commit 4ab9157c authored by Alfredo Cruz's avatar Alfredo Cruz Committed by Heiko Stuebner

drm/rockchip: vop2: Add error check to devm_regmap_init_mmio

devm_regmap_init_mmio() may return an invalid pointer in case of an error.
This patch adds the corresponding IS_ERR check to vop2->map.
Signed-off-by: default avatarAlfredo Cruz <alfredo.carlon@gmail.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230322224411.15612-1-alfredo.carlon@gmail.com
parent b5af48ee
...@@ -2679,6 +2679,8 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) ...@@ -2679,6 +2679,8 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
vop2->len = resource_size(res); vop2->len = resource_size(res);
vop2->map = devm_regmap_init_mmio(dev, vop2->regs, &vop2_regmap_config); vop2->map = devm_regmap_init_mmio(dev, vop2->regs, &vop2_regmap_config);
if (IS_ERR(vop2->map))
return PTR_ERR(vop2->map);
ret = vop2_win_init(vop2); ret = vop2_win_init(vop2);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment