opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER
[linux-2.6-microblaze.git] / drivers / iommu / omap-iommu-debug.c
index 8e19bfa..a99afb5 100644 (file)
@@ -98,8 +98,11 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
        mutex_lock(&iommu_debug_lock);
 
        bytes = omap_iommu_dump_ctx(obj, p, count);
+       if (bytes < 0)
+               goto err;
        bytes = simple_read_from_buffer(userbuf, count, ppos, buf, bytes);
 
+err:
        mutex_unlock(&iommu_debug_lock);
        kfree(buf);