Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34df6ab7 authored by Fabian Frederick's avatar Fabian Frederick Committed by Joerg Roedel
Browse files

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: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4c834452
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1118,7 +1118,6 @@ 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);
		dma_domain->win_arr = kzalloc(sizeof(struct dma_window) *
							  w_count, GFP_ATOMIC);