--- zzzz-none-000/linux-3.10.107/drivers/media/media-devnode.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/media-devnode.c 2021-02-04 17:41:59.000000000 +0000 @@ -192,7 +192,6 @@ 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 @@ return value is ignored. */ put_device(&mdev->dev); filp->private_data = NULL; - return ret; + return 0; } static const struct file_operations media_devnode_fops = { @@ -232,7 +231,8 @@ * the media_devnode structure is *not* called, so the caller is responsible for * freeing any data. */ -int __must_check media_devnode_register(struct media_devnode *mdev) +int __must_check media_devnode_register(struct media_devnode *mdev, + struct module *owner) { int minor; int ret; @@ -253,7 +253,7 @@ /* Part 2: Initialize and register the character device */ cdev_init(&mdev->cdev, &media_devnode_fops); - mdev->cdev.owner = mdev->fops->owner; + mdev->cdev.owner = owner; ret = cdev_add(&mdev->cdev, MKDEV(MAJOR(media_dev_t), mdev->minor), 1); if (ret < 0) {