浏览代码

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>
Sudip Mukherjee 9 年之前
父节点
当前提交
ea39854712
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/staging/most/aim-cdev/cdev.c

+ 2 - 2
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;
 	}