net/nfp: fix null pointer check
authorAlejandro Lucero <alejandro.lucero@netronome.com>
Wed, 8 Nov 2017 14:36:32 +0000 (14:36 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 10 Nov 2017 09:31:24 +0000 (09:31 +0000)
commitfee720e9292529c08f6a80ed05bd47d559812916
treeb88f20091ec174ab9a78902a992e5fd27c014a14
parent1fdbf9b06a45d78f0f94b9c793847047070d6827
net/nfp: fix null pointer check

First, the received pointer was not checked before. Then the pointer
from malloc was not the one used in the existing check.

Coverity issue: 195027
Fixes: ad60bca34899 ("net/nfp: read PF port MAC addr using NSP")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
drivers/net/nfp/nfp_nspu.c