]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/lustre/lustre/obdclass/obd_config.c
staging: lustre: checking for NULL instead if IS_ERR
[karo-tx-linux.git] / drivers / staging / lustre / lustre / obdclass / obd_config.c
index 9ca84c7d49dea090d28d6bda356cc029dadd9882..6a7e7a7d2af151539f3835a78ff49fbdf1006cc9 100644 (file)
@@ -1052,7 +1052,8 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
 
                                        oldfs = get_fs();
                                        set_fs(KERNEL_DS);
-                                       rc = var->fops->write(&fakefile, sval,
+                                       rc = var->fops->write(&fakefile,
+                                               (const char __user *)sval,
                                                                vallen, NULL);
                                        set_fs(oldfs);
                                }
@@ -1426,8 +1427,8 @@ int class_manual_cleanup(struct obd_device *obd)
        lustre_cfg_bufs_reset(&bufs, obd->obd_name);
        lustre_cfg_bufs_set_string(&bufs, 1, flags);
        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-       if (!lcfg)
-               return -ENOMEM;
+       if (IS_ERR(lcfg))
+               return PTR_ERR(lcfg);
 
        rc = class_process_config(lcfg);
        if (rc) {