aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/most/aim-cdev
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-02-08 22:55:34 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-11 19:40:02 -0800
commitea39854712ba8a0757bc9fa6b6c17e8808bc6fda (patch)
tree9216e593a03712dd5a5f63a37f1340101ac77565 /drivers/staging/most/aim-cdev
parentstaging: unisys: Modify boolean assignment (diff)
downloadlinux-dev-ea39854712ba8a0757bc9fa6b6c17e8808bc6fda.tar.xz
linux-dev-ea39854712ba8a0757bc9fa6b6c17e8808bc6fda.zip
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. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/aim-cdev')
-rw-r--r--drivers/staging/most/aim-cdev/cdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index 3a2dbf1490c6..de4f76abfb47 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -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;
}