]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media-devnode: just return 0 instead of using a var
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 18:18:27 +0000 (15:18 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:03:48 +0000 (19:03 +0100)
commit 8b37c6455fc8f43e0e95db2847284e618db6a4f8 upstream.

Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/media/media-devnode.c

index 7acd19c881debe4de5e98e9658108489d4c98c10..ebf9626e5ae5a709f2cb76b3a1c173d7ddb106ba 100644 (file)
@@ -192,7 +192,6 @@ static int media_open(struct inode *inode, struct file *filp)
 static int media_release(struct inode *inode, struct file *filp)
 {
        struct media_devnode *mdev = media_devnode_data(filp);
-       int ret = 0;
 
        if (mdev->fops->release)
                mdev->fops->release(filp);
@@ -201,7 +200,7 @@ static int media_release(struct inode *inode, struct file *filp)
           return value is ignored. */
        put_device(&mdev->dev);
        filp->private_data = NULL;
-       return ret;
+       return 0;
 }
 
 static const struct file_operations media_devnode_fops = {