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);
}
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) {