sparc64: move dereference after check for NULL
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Nov 2016 11:01:32 +0000 (14:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Dec 2016 02:15:48 +0000 (18:15 -0800)
commitefca4885b5dea6af906d27b3516f68e0bc1ff9c3
treee160e8a90a7b8fc8c4edb22cb57029eeedeff72e
parentb1ebb975507d07d3ce84695273acc872786194da
sparc64: move dereference after check for NULL

We shouldn't dereference "iommu" until after we have checked that it is
non-NULL.

Fixes: f08978b0fdbf ("sparc64: Enable sun4v dma ops to use IOMMU v2 APIs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci_sun4v.c