Skip to content

Commit

Permalink
coccinelle: put_device: reduce false positives
Browse files Browse the repository at this point in the history
Don't complain about a return when this function returns "&pdev->dev".

Fixes: da9cfb8 ("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]>
  • Loading branch information
taskset authored and masahir0y committed Mar 28, 2019
1 parent 688931a commit 7265f5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/coccinelle/free/put_device.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ if (id == NULL || ...) { ... return ...; }
( id
| (T2)dev_get_drvdata(&id->dev)
| (T3)platform_get_drvdata(id)
| &id->dev
);
| return@p2 ...;
)
Expand Down

0 comments on commit 7265f5b

Please sign in to comment.