]> git.baikalelectronics.ru Git - kernel.git/commit
net: marvell: prestera: fix a couple NULL vs IS_ERR() checks
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 Oct 2022 15:00:59 +0000 (18:00 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 13 Oct 2022 16:33:57 +0000 (09:33 -0700)
commitf6c79cda91068814f0955dcb2364a9823ee8fde2
tree35e9be9e6be5a30d11ad3df7b4fdafa1d13ea1fd
parentf8336b3c61f2e7d3b35a4801456c7d53d155ac92
net: marvell: prestera: fix a couple NULL vs IS_ERR() checks

The __prestera_nexthop_group_create() function returns NULL on error
and the prestera_nexthop_group_get() returns error pointers.  Fix these
two checks.

Fixes: 9f73a926f0c8 ("net: marvell: prestera: Add router nexthops ABI")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Y0bWq+7DoKK465z8@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_router_hw.c