* [PATCH 4/4] staging: tidspbridge: adjust error return code (bugfix)
@ 2014-01-13 16:12 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2014-01-13 16:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: Omar Ramirez Luna, devel, Greg Kroah-Hartman, kernel-janitors,
linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
The variable status is initialized to either 0 or an error code. Return
status to propagate the error value.
A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
identifier i;
constant c;
@@
-T i;
<... when != i
-i = c;
...>
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
Most remove functions only return 0, as this one did before the change. So
perhaps the correct solution is to remove the status variable?
drivers/staging/tidspbridge/rmgr/drv_interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index cafca46..74d31da 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -589,7 +589,7 @@ func_cont:
class_destroy(bridge_class);
}
- return 0;
+ return status;
}
#ifdef CONFIG_PM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-13 16:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 16:12 [PATCH 4/4] staging: tidspbridge: adjust error return code (bugfix) Julia Lawall
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®