From 84cc35e6e1668dd5f02f9a6156e4046553cecd4d Mon Sep 17 00:00:00 2001 From: Jiamin Ma Date: Fri, 22 Sep 2017 16:16:06 +0800 Subject: [PATCH] mmc: remove unnecessary call to single_release PD#151361: Oops when doing OTA upgrading in single_release file->private_data will be dereferenced, which is assigned a value by single_open. So if signle_open is not called before single_release, an "unable to handle kernel NULL pointer..." issue will appear. But in this case, since single_open and seq_read is not called, there is no need calling single_release to release mem allocated by single_open and seq_read. Simpley remove calling single_release is the best choise Change-Id: I21882da33cc2509c1b5b42daabbd7c6f3fdc4542 Signed-off-by: Jiamin Ma --- drivers/amlogic/mmc/emmc_partitions.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/amlogic/mmc/emmc_partitions.c b/drivers/amlogic/mmc/emmc_partitions.c index 99b18519041d..3a7e7ffbb2da 100644 --- a/drivers/amlogic/mmc/emmc_partitions.c +++ b/drivers/amlogic/mmc/emmc_partitions.c @@ -252,7 +252,6 @@ static const struct file_operations dtb_ops = { .read = mmc_dtb_read, .write = mmc_dtb_write, .unlocked_ioctl = mmc_dtb_ioctl, - .release = single_release, }; int amlmmc_dtb_init(struct mmc_card *card)