mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 17:23:36 +00:00
net: txgbe: Remove unnecessary NULL check before free
Remove unnecessary NULL check before freeing using kvfree(). This function will ignore a NULL argument. Flagged by Coccinelle: .../txgbe_hw.c:187:2-8: WARNING: NULL check before some freeing functions is not needed. No functional change intended. Compile tested only. Signed-off-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240815-txgbe-kvfree-v1-1-5ecf8656f555@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1f803c9569
commit
1c66df8625
@ -103,8 +103,7 @@ static int txgbe_calc_eeprom_checksum(struct wx *wx, u16 *checksum)
|
||||
if (i != wx->eeprom.sw_region_offset + TXGBE_EEPROM_CHECKSUM)
|
||||
*checksum += local_buffer[i];
|
||||
|
||||
if (eeprom_ptrs)
|
||||
kvfree(eeprom_ptrs);
|
||||
kvfree(eeprom_ptrs);
|
||||
|
||||
*checksum = TXGBE_EEPROM_SUM - *checksum;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user