[PATCH 1/2] staging: most: return error value

From: Sudip Mukherjee
Date: Fri Nov 27 2015 - 02:38:07 EST


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

Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---

This series doesnot depend on my earlier pending series.

drivers/staging/most/aim-cdev/cdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index dc3fb25..3f7c8bb 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -468,8 +468,8 @@ static int aim_probe(struct most_interface *iface, int channel_id,
NULL,
"%s", name);

- retval = IS_ERR(channel->dev);
- if (retval) {
+ if (IS_ERR(channel->dev)) {
+ retval = PTR_ERR(channel->dev);
pr_info("failed to create new device node %s\n", name);
goto error_create_device;
}
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/