platform/x86: hp-bioscfg: Remove unused obj in hp_add_other_attributes()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Mon, 13 Nov 2023 20:07:40 +0000 (12:07 -0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 15 Nov 2023 12:45:41 +0000 (14:45 +0200)
acpi_object *obj is unused in this function, so delete it, also
delete a unnecessary kfree(obj);

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231113200742.3593548-4-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c

index 6ddca857cc4d1a02ca4664cb70865fc6df7d6e57..8c9f4f3227fc6dcf244210edd932301f491efb15 100644 (file)
@@ -588,7 +588,6 @@ static void release_attributes_data(void)
 static int hp_add_other_attributes(int attr_type)
 {
        struct kobject *attr_name_kobj;
-       union acpi_object *obj = NULL;
        int ret;
        char *attr_name;
 
@@ -648,7 +647,6 @@ err_other_attr_init:
        kobject_put(attr_name_kobj);
 unlock_drv_mutex:
        mutex_unlock(&bioscfg_drv.mutex);
-       kfree(obj);
        return ret;
 }