diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-10-03 20:53:15 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-07 16:49:43 -0700 |
commit | 83211ae1640516accae645de82f5a0a142676897 (patch) | |
tree | 666dfb9aec97f7917eb1840be21af2b41321cc18 /drivers/spi/spi-pxa2xx.c | |
parent | 5546da79e6cc5bb3324bf25688ed05498fd3f86d (diff) | |
download | lwn-83211ae1640516accae645de82f5a0a142676897.tar.gz lwn-83211ae1640516accae645de82f5a0a142676897.zip |
net: ethernet: adi: adin1110: Fix some error handling path in adin1110_read_fifo()
If 'frame_size' is too small or if 'round_len' is an error code, it is
likely that an error code should be returned to the caller.
Actually, 'ret' is likely to be 0, so if one of these sanity checks fails,
'success' is returned.
Return -EINVAL instead.
Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/8ff73b40f50d8fa994a454911b66adebce8da266.1727981562.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
0 files changed, 0 insertions, 0 deletions