diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-29 10:01:26 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-04 13:08:23 +0200 |
commit | 34df6ab7956a18a2ff7f1bb15d5e9b966602a93b (patch) | |
tree | 9fe400a158720a0844cd9eb75f78e6913edfd231 /drivers/iommu/fsl_pamu_domain.c | |
parent | 4c834452aad01531db949414f94f817a86348d59 (diff) | |
download | linux-34df6ab7956a18a2ff7f1bb15d5e9b966602a93b.tar.gz linux-34df6ab7956a18a2ff7f1bb15d5e9b966602a93b.tar.xz |
iommu/fsl_pamu: Remove unnecessary null test before kfree
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>
Diffstat (limited to 'drivers/iommu/fsl_pamu_domain.c')
-rw-r--r-- | drivers/iommu/fsl_pamu_domain.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index 93072ba44b1d..0009dffe8000 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -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) { |