summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-23 19:32:47 +0200
committerDavid S. Miller <davem@davemloft.net>2014-06-25 16:15:16 -0700
commit1f74714f1e34a84fe4ef2a6d9b76c20794fb5dcf (patch)
tree4d8d69574c43f8c0a6b4a3e880409c8cbc190690 /net/dsa
parentcb8eb77663dda1502ec419962980053cd0092d48 (diff)
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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 5db37cef50a9..0a49632fac47 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -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);