platform/x86/intel: tpmi: Revise the comment of intel_vsec_add_aux
authorDongliang Mu <dzm91@hust.edu.cn>
Thu, 9 Mar 2023 04:01:06 +0000 (12:01 +0800)
committerHans de Goede <hdegoede@redhat.com>
Mon, 20 Mar 2023 12:11:55 +0000 (13:11 +0100)
intel_vsec_add_aux() is resource managed including res and
feature_vsec_dev memory.

Fix this by revising the comment of intel_vsec_add_aux since res variable
will also be freed in the intel_vsec_add_aux.

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230309040107.534716-3-dzm91@hust.edu.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/tpmi.c

index a8733c43e4abec912518fc913533936e9d80f904..a5227951decce90f3eaf95aedfa0383a1c2bf957 100644 (file)
@@ -239,8 +239,8 @@ static int tpmi_create_device(struct intel_tpmi_info *tpmi_info,
        /*
         * intel_vsec_add_aux() is resource managed, no explicit
         * delete is required on error or on module unload.
-        * feature_vsec_dev memory is also freed as part of device
-        * delete.
+        * feature_vsec_dev and res memory are also freed as part of
+        * device deletion.
         */
        return intel_vsec_add_aux(vsec_dev->pcidev, &vsec_dev->auxdev.dev,
                                  feature_vsec_dev, feature_id_name);