summaryrefslogtreecommitdiff
path: root/scripts/coccinelle/free/put_device.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccinelle/free/put_device.cocci')
-rw-r--r--scripts/coccinelle/free/put_device.cocci11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci
index c9f071b0a0ab..120921366e84 100644
--- a/scripts/coccinelle/free/put_device.cocci
+++ b/scripts/coccinelle/free/put_device.cocci
@@ -24,7 +24,7 @@ if (id == NULL || ...) { ... return ...; }
when != of_dev_put(id)
when != if (id) { ... put_device(&id->dev) ... }
when != e1 = (T)id
- when != e1 = &id->dev
+ when != e1 = (T)(&id->dev)
when != e1 = get_device(&id->dev)
when != e1 = (T1)platform_get_drvdata(id)
(
@@ -42,11 +42,10 @@ p1 << search.p1;
p2 << search.p2;
@@
-coccilib.report.print_report(p2[0], "ERROR: missing put_device; "
- + "call of_find_device_by_node on line "
- + p1[0].line
- + ", but without a corresponding object release "
- + "within this function.")
+coccilib.report.print_report(p2[0],
+ "ERROR: missing put_device; call of_find_device_by_node on line "
+ + p1[0].line
+ + ", but without a corresponding object release within this function.")
@script:python depends on org@
p1 << search.p1;