From: Yakir Yang Date: Sat, 16 Jul 2016 08:29:32 +0000 (+0800) Subject: media: rockchip-vpu: fix compiled warning about uninitialized 'ret' X-Git-Tag: firefly_0821_release~2133 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=15fe5755d5af9a87852a14b25a70d7e86af66524;p=firefly-linux-kernel-4.4.55.git 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 --- 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)