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]>
---
V2: Use more appropriate subject (suggested by Joe Perches).

 net/dsa/dsa.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 5db37ce..0a49632 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);
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to