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>
This commit is contained in:
Krzysztof Kozlowski 2020-12-07 19:59:52 +01:00 committed by Greg Kroah-Hartman
parent 9c30921fe7
commit 0b81144a4a
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ struct soc_device *soc_device_register(struct soc_device_attribute *soc_dev_attr
}
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);