]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
iommu: Fix static checker warning in iommu_insert_device_resv_regions
authorEric Auger <eric.auger@redhat.com>
Mon, 6 Feb 2017 09:11:38 +0000 (10:11 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 9 Mar 2017 19:08:02 +0000 (13:08 -0600)
commit88178a77afcb28a84ed534fc6f6667191971f197
tree3229f3fd9480c4458609bbe7bd4bb9e662b34bc7
parent554c46d54fe9b4427485f0c305c180fc833efe92
iommu: Fix static checker warning in iommu_insert_device_resv_regions

BugLink: http://bugs.launchpad.net/bugs/1671599
In case the device reserved region list is void, the returned value
of iommu_insert_device_resv_regions is uninitialized. Let's return 0
in that case.

This fixes commit 6c65fb318e8b ("iommu: iommu_get_group_resv_regions").

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit a514a6e241f051dd8a4a00a456382dec0b1af21b)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/iommu/iommu.c