iommu/fsl_pamu: Remove unnecessary null test before kfree
authorFabian Frederick <fabf@skynet.be>
Sun, 29 Jun 2014 08:01:26 +0000 (10:01 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 4 Jul 2014 11:08:23 +0000 (13:08 +0200)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: iommu@lists.linux-foundation.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/fsl_pamu_domain.c

index 93072ba44b1d179dff9a486cd728cf16ea645691..0009dffe80008bb89484a33c10db73b8d9f93a63 100644 (file)
@@ -1118,8 +1118,7 @@ static int fsl_pamu_set_windows(struct iommu_domain *domain, u32 w_count)
        ret = pamu_set_domain_geometry(dma_domain, &domain->geometry,
                                ((w_count > 1) ? w_count : 0));
        if (!ret) {
-               if (dma_domain->win_arr)
-                       kfree(dma_domain->win_arr);
+               kfree(dma_domain->win_arr);
                dma_domain->win_arr = kzalloc(sizeof(struct dma_window) *
                                                          w_count, GFP_ATOMIC);
                if (!dma_domain->win_arr) {
This page took 0.02543 seconds and 5 git commands to generate.