|
@@ -1376,15 +1376,15 @@ unsigned long do_mmap_pgoff(struct file *file,
|
|
if (capabilities & BDI_CAP_MAP_DIRECT) {
|
|
if (capabilities & BDI_CAP_MAP_DIRECT) {
|
|
addr = file->f_op->get_unmapped_area(file, addr, len,
|
|
addr = file->f_op->get_unmapped_area(file, addr, len,
|
|
pgoff, flags);
|
|
pgoff, flags);
|
|
- if (IS_ERR((void *) addr)) {
|
|
|
|
|
|
+ if (IS_ERR_VALUE(addr)) {
|
|
ret = addr;
|
|
ret = addr;
|
|
- if (ret != (unsigned long) -ENOSYS)
|
|
|
|
|
|
+ if (ret != -ENOSYS)
|
|
goto error_just_free;
|
|
goto error_just_free;
|
|
|
|
|
|
/* the driver refused to tell us where to site
|
|
/* the driver refused to tell us where to site
|
|
* the mapping so we'll have to attempt to copy
|
|
* the mapping so we'll have to attempt to copy
|
|
* it */
|
|
* it */
|
|
- ret = (unsigned long) -ENODEV;
|
|
|
|
|
|
+ ret = -ENODEV;
|
|
if (!(capabilities & BDI_CAP_MAP_COPY))
|
|
if (!(capabilities & BDI_CAP_MAP_COPY))
|
|
goto error_just_free;
|
|
goto error_just_free;
|
|
|
|
|