From 15fe5755d5af9a87852a14b25a70d7e86af66524 Mon Sep 17 00:00:00 2001 From: Yakir Yang Date: Sat, 16 Jul 2016 16:29:32 +0800 Subject: [PATCH] media: rockchip-vpu: fix compiled warning about uninitialized 'ret' rockchip_vpu_hw.c:251:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] Change-Id: Ia5564c2da345c5922341b818961b18d2b1419013 Signed-off-by: Yakir Yang --- drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.c b/drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.c index d990e09c8246..6006bd1b70c5 100644 --- a/drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.c +++ b/drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.c @@ -163,8 +163,10 @@ static int rockchip_vpu_iommu_init(struct rockchip_vpu_dev *vpu) return -ENOMEM; vpu->domain = iommu_domain_alloc(vpu->dev->bus); - if (!vpu->domain) + if (!vpu->domain) { + ret = -ENOMEM; goto err_free_parms; + } ret = iommu_get_dma_cookie(vpu->domain); if (ret) -- 2.34.1