nfp: handle page allocation failures
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 10 Oct 2017 16:16:23 +0000 (09:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Oct 2017 20:18:33 +0000 (13:18 -0700)
commit5f0ca2fb71e28df146f590eebfe32b41171b737f
tree97ba442e53e8eb00ea1527077fbd67c3179c5a32
parentc3d64ad4fea66d07e878b248b803ccd12c45e18c
nfp: handle page allocation failures

page_address() does not handle NULL argument gracefully,
make sure we NULL-check the page pointer before passing it
to page_address().

Fixes: ecd63a0217d5 ("nfp: add XDP support in the driver")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c