diff options
author | Shiraz Hashim <shashim@codeaurora.org> | 2016-07-04 15:05:35 +0530 |
---|---|---|
committer | Kyle Yan <kyan@codeaurora.org> | 2016-07-11 14:26:46 -0700 |
commit | 50044eb1b4614a2013e64a69df2ddb5e84f0466e (patch) | |
tree | a1ebb41d32e3d4bf4ab925e67c150b4a3949e515 /drivers/iommu/iommu-debug.c | |
parent | 81218366f19d6d290f861a3dcb565fb49c21b488 (diff) |
iommu/iommu-debug:: initialize variables before use
Initialize return values to their default before being
used.
Change-Id: Ie4dd908657573e5110bce65931d5507125da4c40
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Diffstat (limited to 'drivers/iommu/iommu-debug.c')
-rw-r--r-- | drivers/iommu/iommu-debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/iommu-debug.c b/drivers/iommu/iommu-debug.c index a97c082d18d8..c78178c0e1a1 100644 --- a/drivers/iommu/iommu-debug.c +++ b/drivers/iommu/iommu-debug.c @@ -1379,7 +1379,7 @@ static int __apply_to_new_mapping(struct seq_file *s, struct dma_iommu_mapping *mapping; struct iommu_debug_device *ddev = s->private; struct device *dev = ddev->dev; - int ret, fast = 1; + int ret = -EINVAL, fast = 1; phys_addr_t pt_phys; mapping = arm_iommu_create_mapping(&platform_bus_type, 0, SZ_1G * 4ULL); @@ -1688,7 +1688,7 @@ static const struct file_operations iommu_debug_atos_fops = { static ssize_t iommu_debug_map_write(struct file *file, const char __user *ubuf, size_t count, loff_t *offset) { - ssize_t retval; + ssize_t retval = -EINVAL; int ret; char *comma1, *comma2, *comma3; char buf[100]; |