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" <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: [email protected]
Cc: Joe Perches <[email protected]>
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Fabian Frederick 2014-06-23 19:32:47 +02:00 • committed by David S. Miller
commit 1f74714f1e

View file

@ -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);