net: ti: icssg-prueth: Fix signedness bug in prueth_init_rx_chns()
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 23 Apr 2024 16:15:22 +0000 (19:15 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Apr 2024 15:20:54 +0000 (08:20 -0700)
commit4dcd0e83ea1d1df9b2e0174a6d3e795b3477d64e
treec5b9827995a996c98908967ee6fc8c9f5d1eeaac
parent46bf0c9ab79426a0012158ef88ec8d7da0403b19
net: ti: icssg-prueth: Fix signedness bug in prueth_init_rx_chns()

The rx_chn->irq[] array is unsigned int but it should be signed for the
error handling to work.  Also if k3_udma_glue_rx_get_irq() returns zero
then we should return -ENXIO instead of success.

Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: MD Danish Anwar <danishanwar@ti.com>
Link: https://lore.kernel.org/r/05282415-e7f4-42f3-99f8-32fde8f30936@moroto.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/icssg/icssg_prueth.c