Skip to contentSkip to conversation

staging: tidspbridge: adjust error return code (bugfix)

PATCH New Julia Lawall 1 participant 1 message Jan 13, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 staging: tidspbridge: adjust error return code (bugfix)

From: Julia Lawall <[email protected]>

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>

---
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(-)
drivers/staging/tidspbridge/rmgr/drv_interface.c +1 -1
index cafca46..74d31da 100644
@@ -589,7 +589,7 @@ func_cont:
 		class_destroy(bridge_class);
 
 	}
-	return 0;
+	return status;
 }
 
 #ifdef CONFIG_PM