Commit 5736aa9
platform/x86: hp-bioscfg: move mutex_lock() down in hp_add_other_attributes()
attr_name_kobj's memory allocation is done with mutex_lock() held, this
is not needed.
Move allocation outside of mutex_lock() so unlock is not needed when
allocation fails.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
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-2-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>1 parent c5dbf04 commit 5736aa9
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
595 | | - | |
596 | | - | |
597 | 595 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
602 | 600 | | |
603 | 601 | | |
604 | 602 | | |
| |||
0 commit comments