[PATCH 2/5] firmware: arm_scpi: remove two unneeded devm_kfree's in scpi_remove

Heiner Kallweit hkallweit1 at gmail.com
Fri Sep 29 14:44:01 PDT 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 c942761e..d80d11ae 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -914,8 +914,6 @@ static int scpi_remove(struct platform_device *pdev)
 		kfree(scpi_info->dvfs[i]->opps);
 		kfree(scpi_info->dvfs[i]);
 	}
-	devm_kfree(dev, scpi_info->channels);
-	devm_kfree(dev, scpi_info);
 
 	return 0;
 }
-- 
2.14.2





More information about the linux-arm-kernel mailing list