mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
drivers: soc: qcom: avoid double initialization of kobj
In rimps_memlat driver the rimps_kobj is initialized twice once while creating and another while initializing and adding to the parent kobj, which resulted in kernel warning. Fix the double initialization of rimps_kobj. Change-Id: I95c03d83f63cffd506b2f3ee36f1a6da9f4f1d31 Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
This commit is contained in:
parent
5702001dfb
commit
c8c8485942
1 changed files with 5 additions and 2 deletions
|
|
@ -1255,10 +1255,13 @@ static int memlat_cpu_grp_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
if (!rimps_kobj) {
|
||||
rimps_kobj = kobject_create();
|
||||
if (!rimps_kobj)
|
||||
rimps_kobj = kzalloc(sizeof(*rimps_kobj), GFP_KERNEL);
|
||||
|
||||
if (!rimps_kobj) {
|
||||
dev_err(dev, "%s: failed to create rimps_kobj\n",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = kobject_init_and_add(rimps_kobj, &ktype_log_level,
|
||||
&cpu_subsys.dev_root->kobj, "memlat");
|
||||
|
|
|
|||
Loading…
Reference in a new issue