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:
688931a
)
coccinelle: put_device: reduce false positives
author
Wen Yang
<
[email protected]
>
Sat, 23 Mar 2019 06:14:31 +0000
(14:14 +0800)
committer
Masahiro Yamada
<
[email protected]
>
Thu, 28 Mar 2019 14:45:59 +0000
(23:45 +0900)
Don't complain about a return when this function returns "&pdev->dev".
Fixes: da9cfb87a44d ("coccinelle: semantic code search for missing put_device()")
Reported-by: Julia Lawall <
[email protected]
>
Signed-off-by: Wen Yang <
[email protected]
>
Acked-by: Julia Lawall <
[email protected]
>
Signed-off-by: Masahiro Yamada <
[email protected]
>
scripts/coccinelle/free/put_device.cocci
patch
|
blob
|
history
diff --git
a/scripts/coccinelle/free/put_device.cocci
b/scripts/coccinelle/free/put_device.cocci
index 7395697e7f19a5f524d883b7079197434c2983ae..c9f071b0a0ab70b647bec3633571059934ece1bc 100644
(file)
--- a/
scripts/coccinelle/free/put_device.cocci
+++ b/
scripts/coccinelle/free/put_device.cocci
@@
-32,6
+32,7
@@
if (id == NULL || ...) { ... return ...; }
( id
| (T2)dev_get_drvdata(&id->dev)
| (T3)platform_get_drvdata(id)
+| &id->dev
);
| return@p2 ...;
)