Merge tag 'hwlock-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson...
[linux-2.6-microblaze.git] / drivers / lightnvm / core.c
index 28ddcaa..40a948c 100644 (file)
@@ -1174,6 +1174,8 @@ int nvm_register(struct nvm_dev *dev)
 {
        int ret, exp_pool_size;
 
+       pr_warn_once("lightnvm support is deprecated and will be removed in Linux 5.15.\n");
+
        if (!dev->q || !dev->ops) {
                kref_put(&dev->ref, nvm_free);
                return -EINVAL;
@@ -1257,7 +1259,7 @@ static long nvm_ioctl_info(struct file *file, void __user *arg)
 
        info = memdup_user(arg, sizeof(struct nvm_ioctl_info));
        if (IS_ERR(info))
-               return -EFAULT;
+               return PTR_ERR(info);
 
        info->version[0] = NVM_VERSION_MAJOR;
        info->version[1] = NVM_VERSION_MINOR;