File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1455,6 +1455,14 @@ static int tlmi_sysfs_init(void)
1455
1455
goto fail_device_created ;
1456
1456
}
1457
1457
1458
+ tlmi_priv .authentication_kset = kset_create_and_add ("authentication" , NULL ,
1459
+ & tlmi_priv .class_dev -> kobj );
1460
+ if (!tlmi_priv .authentication_kset ) {
1461
+ kset_unregister (tlmi_priv .attribute_kset );
1462
+ ret = - ENOMEM ;
1463
+ goto fail_device_created ;
1464
+ }
1465
+
1458
1466
for (i = 0 ; i < TLMI_SETTINGS_COUNT ; i ++ ) {
1459
1467
/* Check if index is a valid setting - skip if it isn't */
1460
1468
if (!tlmi_priv .setting [i ])
@@ -1496,12 +1504,6 @@ static int tlmi_sysfs_init(void)
1496
1504
}
1497
1505
1498
1506
/* Create authentication entries */
1499
- tlmi_priv .authentication_kset = kset_create_and_add ("authentication" , NULL ,
1500
- & tlmi_priv .class_dev -> kobj );
1501
- if (!tlmi_priv .authentication_kset ) {
1502
- ret = - ENOMEM ;
1503
- goto fail_create_attr ;
1504
- }
1505
1507
tlmi_priv .pwd_admin -> kobj .kset = tlmi_priv .authentication_kset ;
1506
1508
ret = kobject_add (& tlmi_priv .pwd_admin -> kobj , NULL , "%s" , "Admin" );
1507
1509
if (ret )
You can’t perform that action at this time.
0 commit comments