diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-14 07:49:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-15 01:59:43 +0200 |
commit | f37c54b6a6c56489221d42ff27305e4f8098e34b (patch) | |
tree | 5c0d7a6e98f10860dbfeffddf1bd5bd5e245b7e6 /drivers/of | |
parent | llc: Fix races between llc2 handler use and (un)registration (diff) | |
download | linux-f37c54b6a6c56489221d42ff27305e4f8098e34b.tar.xz linux-f37c54b6a6c56489221d42ff27305e4f8098e34b.zip |
drivers/net/ethernet/ti/davinci_cpdma.c: Remove potential NULL dereference
If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.
The sematic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@
- T i = E->fld;
+ T i;
... when != E
when != i
if (E == NULL) S
+ i = E->fld;
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions