Skip to contentSkip to conversation

staging: most: return error value

PATCH Superseded Sudip Mukherjee 1 participant 1 message Feb 8, 2016

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

PATCH v2 1/1 staging: most: return error value

On error we were returning retval, but retval is not having the error value. We will get the error value using PTR_ERR.

---

v2: sent after rebasing

 drivers/staging/most/aim-cdev/cdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/most/aim-cdev/cdev.c +2 -2
index 3a2dbf1..de4f76a 100644
@@ -470,8 +470,8 @@ static int aim_probe(struct most_interface *iface, int channel_id,
 				     NULL,
 				     "%s", name);
 
-	retval = IS_ERR(c->dev);
-	if (retval) {
+	if (IS_ERR(c->dev)) {
+		retval = PTR_ERR(c->dev);
 		pr_info("failed to create new device node %s\n", name);
 		goto error_create_device;
 	}
Signature · 1 line
1.9.1