mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 04:42:12 +00:00
net/dsa/dsa.c: remove unnecessary null test before kfree
Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: "David S. Miller" <davem@davemloft.net> Cc: Grant Likely <grant.likely@linaro.org> Cc: netdev@vger.kernel.org Cc: Joe Perches <joe@perches.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cb8eb77663
commit
1f74714f1e
@ -351,8 +351,7 @@ static void dsa_of_free_platform_data(struct dsa_platform_data *pd)
|
||||
for (i = 0; i < pd->nr_chips; i++) {
|
||||
port_index = 0;
|
||||
while (port_index < DSA_MAX_PORTS) {
|
||||
if (pd->chip[i].port_names[port_index])
|
||||
kfree(pd->chip[i].port_names[port_index]);
|
||||
kfree(pd->chip[i].port_names[port_index]);
|
||||
port_index++;
|
||||
}
|
||||
kfree(pd->chip[i].rtable);
|
||||
|
Loading…
Reference in New Issue
Block a user