diff mbox

[07/11] iommu/omap: Remove unnecessary error traces on alloc failures

Message ID 1437431613-55656-8-git-send-email-s-anna@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Suman Anna July 20, 2015, 10:33 p.m. UTC
Fix couple of checkpatch warnings of the type,
    "WARNING: Possible unnecessary 'out of memory' message"

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/iommu/omap-iommu.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Laurent Pinchart July 21, 2015, 4:03 p.m. UTC | #1
Hi Suman,

Thank you for the patch.

On Monday 20 July 2015 17:33:29 Suman Anna wrote:
> Fix couple of checkpatch warnings of the type,
>     "WARNING: Possible unnecessary 'out of memory' message"
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>

The commit message could also mention that the reason to remove the error 
messages is that memory allocation failures will already be reported in the 
kernel log by the memory management code. No big deal though,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/iommu/omap-iommu.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 0fc00f31c39d..4328d9855edb 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1093,16 +1093,12 @@ static struct iommu_domain
> *omap_iommu_domain_alloc(unsigned type) return NULL;
> 
>  	omap_domain = kzalloc(sizeof(*omap_domain), GFP_KERNEL);
> -	if (!omap_domain) {
> -		pr_err("kzalloc failed\n");
> +	if (!omap_domain)
>  		goto out;
> -	}
> 
>  	omap_domain->pgtable = kzalloc(IOPGD_TABLE_SIZE, GFP_KERNEL);
> -	if (!omap_domain->pgtable) {
> -		pr_err("kzalloc failed\n");
> +	if (!omap_domain->pgtable)
>  		goto fail_nomem;
> -	}
> 
>  	/*
>  	 * should never fail, but please keep this around to ensure
diff mbox

Patch

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 0fc00f31c39d..4328d9855edb 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1093,16 +1093,12 @@  static struct iommu_domain *omap_iommu_domain_alloc(unsigned type)
 		return NULL;
 
 	omap_domain = kzalloc(sizeof(*omap_domain), GFP_KERNEL);
-	if (!omap_domain) {
-		pr_err("kzalloc failed\n");
+	if (!omap_domain)
 		goto out;
-	}
 
 	omap_domain->pgtable = kzalloc(IOPGD_TABLE_SIZE, GFP_KERNEL);
-	if (!omap_domain->pgtable) {
-		pr_err("kzalloc failed\n");
+	if (!omap_domain->pgtable)
 		goto fail_nomem;
-	}
 
 	/*
 	 * should never fail, but please keep this around to ensure