]> git.hungrycats.org Git - linux/commit
net: lan966x: cleanup error handling in lan966x_fdma_rx_alloc_page_pool()
authorDan Carpenter <error27@gmail.com>
Thu, 21 May 2026 12:49:36 +0000 (15:49 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 25 May 2026 19:54:37 +0000 (12:54 -0700)
commit640656c30a6a89f7b34568b0f632a5fe007ff9d0
tree4d35b0ef2b77b58fbc5daebc505cd0674247800f
parentc96a5209dda666004b8ee1ed7f0d493d09a4f200
net: lan966x: cleanup error handling in lan966x_fdma_rx_alloc_page_pool()

This code works, but there are a few things to tidy up:
1. No need to an unlikely() because IS_ERR() already has an unlikely()
   built in.
2. No need to use PTR_ERR_OR_ZERO() because it's not an error pointer.
3. Use the returned error code directly instead of using groveling in
   rx->page_pool to find it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/ag7_YBWRpRmY9MGT@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c