We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5dbf04 commit 5736aa9Copy full SHA for 5736aa9
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -592,13 +592,11 @@ static int hp_add_other_attributes(int attr_type)
592
int ret;
593
char *attr_name;
594
595
- mutex_lock(&bioscfg_drv.mutex);
596
-
597
attr_name_kobj = kzalloc(sizeof(*attr_name_kobj), GFP_KERNEL);
598
- if (!attr_name_kobj) {
599
- ret = -ENOMEM;
600
- goto err_other_attr_init;
601
- }
+ if (!attr_name_kobj)
+ return -ENOMEM;
+
+ mutex_lock(&bioscfg_drv.mutex);
602
603
/* Check if attribute type is supported */
604
switch (attr_type) {
0 commit comments