projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
275350a
)
[media] sp2: Delete an unnecessary check before the function call "kfree"
author
Markus Elfring
<
[email protected]
>
Tue, 3 Feb 2015 14:05:26 +0000
(11:05 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Wed, 8 Apr 2015 10:36:00 +0000
(07:36 -0300)
The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/dvb-frontends/sp2.c
patch
|
blob
|
history
diff --git
a/drivers/media/dvb-frontends/sp2.c
b/drivers/media/dvb-frontends/sp2.c
index cc1ef966f99f2b6cd937f0b921144bcdcd2ade0a..8fd42767e263da4998d2e3e5676bd258a1d5246c 100644
(file)
--- a/
drivers/media/dvb-frontends/sp2.c
+++ b/
drivers/media/dvb-frontends/sp2.c
@@
-413,11
+413,8
@@
static int sp2_remove(struct i2c_client *client)
struct sp2 *s = i2c_get_clientdata(client);
dev_dbg(&client->dev, "\n");
-
sp2_exit(client);
- if (s != NULL)
- kfree(s);
-
+ kfree(s);
return 0;
}