summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-12-07 21:59:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-09 21:46:31 +0300
commit0b81144a4ac20f0757b7c965d2fa57de367c7db5 (patch)
tree504290d91ee1d8474344d00b8c533061e5803d46 /drivers/base
parent9c30921fe7994907e0b3e0637b2c8c0fc4b5171f (diff)
downloadlinux-0b81144a4ac20f0757b7c965d2fa57de367c7db5.tar.xz
soc: fix comment for freeing soc_dev_attr
The soc_dev_attr is stored soc_dev->attr during soc_device_register() so it could be used till the cleanup call: soc_device_unregister(). Therefore this memory should not be freed prior, but after unregistering soc device. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20201207185952.261697-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/soc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index d34609bb7386..0af5363a582c 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -168,7 +168,7 @@ out1:
}
EXPORT_SYMBOL_GPL(soc_device_register);
-/* Ensure soc_dev->attr is freed prior to calling soc_device_unregister. */
+/* Ensure soc_dev->attr is freed after calling soc_device_unregister. */
void soc_device_unregister(struct soc_device *soc_dev)
{
device_unregister(&soc_dev->dev);