Skip to content

Commit

Permalink
iommu/fsl_pamu: Remove unnecessary null test before kfree
Browse files Browse the repository at this point in the history
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Joerg Roedel <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
Fabian Frederick authored and joergroedel committed Jul 4, 2014
1 parent 4c83445 commit 34df6ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/fsl_pamu_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 34df6ab

Please sign in to comment.