]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: Fix passing zero to 'PTR_ERR'
authorYueHaibing <yuehaibing@huawei.com>
Thu, 12 Nov 2020 14:58:52 +0000 (22:58 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 18:11:12 +0000 (10:11 -0800)
commit844e4b25c1278bbb0b7097181c3cf13b6fc4cca4
treec126b14dafe385d0834bb4da03e49ec9670272d0
parent50678400e9b9f363e05f4d35352e3e4104e2f51c
nfp: Fix passing zero to 'PTR_ERR'

nfp_cpp_from_nfp6000_pcie() returns ERR_PTR() and never returns
NULL. The NULL test should be removed, also return correct err.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Link: https://lore.kernel.org/r/20201112145852.6580-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfp_main.c