]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/iommu: Avoid derefence before pointer check
authorBreno Leitao <leitao@debian.org>
Tue, 21 Aug 2018 18:44:48 +0000 (15:44 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Sep 2018 11:58:09 +0000 (21:58 +1000)
commit7e57782f62673b073c6a1669e2647e412de9f5c2
tree4eb2bb5bf308d08eb4791b8cd5b34f4863019cb2
parentfcfacd1e990b061dd8b23761dc2823040415c209
powerpc/iommu: Avoid derefence before pointer check

The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check
if it is not NULL.

Just moving the dereference code to after the check, where there will
be guarantee that 'tbl' will not be NULL.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/iommu.c