NTB: variable dereferenced before check
authorJon Mason <jon.mason@intel.com>
Tue, 22 Jan 2013 18:35:40 +0000 (11:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2013 18:36:03 +0000 (11:36 -0700)
commitf22351258e21247e1faa73fa2b477510481d7f7c
treefa2071232e77df75ed55c38c23727af15691e508
parent1435b05b0477773ec80059a6f83bc99862fb0036
NTB: variable dereferenced before check

commit 186f27ff9f9ec5c110739ced88ce9f8fca053882 upstream.

Correct instances of variable dereferencing before checking its value on
the functions exported to the client drivers.  Also, add sanity checks
for all exported functions.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ntb/ntb_transport.c