mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] coccinelle: put_device: reduce false positives
@ 2019-03-23  6:14 Wen Yang
  2019-05-13  8:55 ` [PATCH 0/5] Coccinelle: put_device: Adjustments for a SmPL script Markus Elfring
  0 siblings, 1 reply; 7+ messages in thread
From: Wen Yang @ 2019-03-23  6:14 UTC (permalink / raw)
  To: yamada.masahiro
  Cc: linux-kernel, wang.yi59, Wen Yang, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, cocci

Don't complain about a return when this function returns "&pdev->dev".

Reported-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Cc: Nicolas Palix <nicolas.palix@imag.fr>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
CC: cocci@systeme.lip6.fr
Cc: linux-kernel@vger.kernel.org
---
 scripts/coccinelle/free/put_device.cocci | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci
index 7395697..c9f071b 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 ...;
 )
-- 
2.9.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-15 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201905141718583344787@zte.com.cn>
2019-05-14  9:51 ` [4/5] Coccinelle: put_device: Extend when constraints for twoSmPL ellipses Markus Elfring
2019-05-15 17:09 ` [4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses Markus Elfring
2019-03-23  6:14 [PATCH] coccinelle: put_device: reduce false positives Wen Yang
2019-05-13  8:55 ` [PATCH 0/5] Coccinelle: put_device: Adjustments for a SmPL script Markus Elfring
2019-05-13  9:07   ` [PATCH 4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses Markus Elfring
2019-05-13  9:31     ` Julia Lawall
2019-05-13 12:22       ` [4/5] " Markus Elfring
2019-05-14  5:55       ` Markus Elfring
2019-05-14  6:52         ` Julia Lawall
2019-05-14  7:49           ` Markus Elfring
2019-05-14  7:49           ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®