diff options
Diffstat (limited to 'drivers/mtd/ubi/misc.c')
-rw-r--r-- | drivers/mtd/ubi/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c index 38d4e6757dc7..9e2338c8e2cf 100644 --- a/drivers/mtd/ubi/misc.c +++ b/drivers/mtd/ubi/misc.c @@ -67,7 +67,7 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id) if (vol->vol_type != UBI_STATIC_VOLUME) return 0; - buf = kmalloc(vol->usable_leb_size, GFP_KERNEL); + buf = vmalloc(vol->usable_leb_size); if (!buf) return -ENOMEM; @@ -87,7 +87,7 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id) } } - kfree(buf); + vfree(buf); return err; } |