Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: "David S. Miller" <da...@davemloft.net>
Cc: Grant Likely <grant.lik...@linaro.org>
Cc: net...@vger.kernel.org
Cc: Joe Perches <j...@perches.com>
Signed-off-by: Fabian Frederick <f...@skynet.be>
---
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 majord...@vger.kernel.org
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