diff options
author | Wen Yang <wen.yang99@zte.com.cn> | 2019-03-23 07:14:31 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-28 15:45:59 +0100 |
commit | 7265f5b72640f43e558af80347c62e32d568371f (patch) | |
tree | a73c895f860edb55e4266b24abcf3e0bc1208d8f /scripts | |
parent | kbuild: skip sub-make for in-tree build with GNU Make 4.x (diff) | |
download | linux-7265f5b72640f43e558af80347c62e32d568371f.tar.xz linux-7265f5b72640f43e558af80347c62e32d568371f.zip |
coccinelle: put_device: reduce false positives
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 <Julia.Lawall@lip6.fr>
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/coccinelle/free/put_device.cocci | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci index 7395697e7f19..c9f071b0a0ab 100644 --- 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 ...; ) |