[PATCH 01/12] firmware: arm_scpi: remove two unneeded devm_kfree's in scpi_remove

Heiner Kallweit hkallweit1 at gmail.com
Tue Dec 5 14:16:35 PST 2017


Both memory areas are free'd anyway when the device is destroyed,
so we don't have to do it manually. 

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 drivers/firmware/arm_scpi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 7da9f1b8..2a30d255 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -918,8 +918,6 @@ static int scpi_remove(struct platform_device *pdev)
 		kfree(info->dvfs[i]->opps);
 		kfree(info->dvfs[i]);
 	}
-	devm_kfree(dev, info->channels);
-	devm_kfree(dev, info);
 
 	return 0;
 }
-- 
2.15.1





More information about the linux-arm-kernel mailing list