* [PATCH V2] net/dsa/dsa.c: remove unnecessary null test before kfree
@ 2014-06-23 17:32 Fabian Frederick
2014-06-25 23:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-06-23 17:32 UTC (permalink / raw)
To: linux-kernel
Cc: Fabian Frederick, David S. Miller, Grant Likely, netdev,
Joe Perches
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V2] net/dsa/dsa.c: remove unnecessary null test before kfree
2014-06-23 17:32 [PATCH V2] net/dsa/dsa.c: remove unnecessary null test before kfree Fabian Frederick
@ 2014-06-25 23:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-25 23:15 UTC (permalink / raw)
To: fabf; +Cc: linux-kernel, grant.likely, netdev, joe
From: Fabian Frederick <fabf@skynet.be>
Date: Mon, 23 Jun 2014 19:32:47 +0200
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-25 23:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 17:32 [PATCH V2] net/dsa/dsa.c: remove unnecessary null test before kfree Fabian Frederick
2014-06-25 23:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).