IB/core: Fix dereference before check
authorMatan Barak <matanb@mellanox.com>
Wed, 30 Dec 2015 14:14:18 +0000 (16:14 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:26:54 +0000 (15:26 -0500)
commit9506902b7be2d8ccc235c14ccaec7f07b2c7d520
tree196b87a189b9d2bf91a9ba52bbf5f6b059559e11
parent2e2cdace5a26507a564d319a1338920a838ef52e
IB/core: Fix dereference before check

Sparse complains about dereference before check. Fixing this by
moving the check before the dereference.

Fixes: 200298326b27 ('IB/core: Validate route when we init ah')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/addr.c