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 @@ -1388,6 +1388,14 @@ static int tlmi_sysfs_init(void)
1388
1388
goto fail_device_created ;
1389
1389
}
1390
1390
1391
+ tlmi_priv .authentication_kset = kset_create_and_add ("authentication" , NULL ,
1392
+ & tlmi_priv .class_dev -> kobj );
1393
+ if (!tlmi_priv .authentication_kset ) {
1394
+ kset_unregister (tlmi_priv .attribute_kset );
1395
+ ret = - ENOMEM ;
1396
+ goto fail_device_created ;
1397
+ }
1398
+
1391
1399
for (i = 0 ; i < TLMI_SETTINGS_COUNT ; i ++ ) {
1392
1400
/* Check if index is a valid setting - skip if it isn't */
1393
1401
if (!tlmi_priv .setting [i ])
@@ -1429,12 +1437,6 @@ static int tlmi_sysfs_init(void)
1429
1437
}
1430
1438
1431
1439
/* Create authentication entries */
1432
- tlmi_priv .authentication_kset = kset_create_and_add ("authentication" , NULL ,
1433
- & tlmi_priv .class_dev -> kobj );
1434
- if (!tlmi_priv .authentication_kset ) {
1435
- ret = - ENOMEM ;
1436
- goto fail_create_attr ;
1437
- }
1438
1440
tlmi_priv .pwd_admin -> kobj .kset = tlmi_priv .authentication_kset ;
1439
1441
ret = kobject_add (& tlmi_priv .pwd_admin -> kobj , NULL , "%s" , "Admin" );
1440
1442
if (ret )
You can’t perform that action at this time.
0 commit comments