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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel