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 @@ -1285,6 +1285,14 @@ static int tlmi_sysfs_init(void)
1285
1285
goto fail_device_created ;
1286
1286
}
1287
1287
1288
+ tlmi_priv .authentication_kset = kset_create_and_add ("authentication" , NULL ,
1289
+ & tlmi_priv .class_dev -> kobj );
1290
+ if (!tlmi_priv .authentication_kset ) {
1291
+ kset_unregister (tlmi_priv .attribute_kset );
1292
+ ret = - ENOMEM ;
1293
+ goto fail_device_created ;
1294
+ }
1295
+
1288
1296
for (i = 0 ; i < TLMI_SETTINGS_COUNT ; i ++ ) {
1289
1297
/* Check if index is a valid setting - skip if it isn't */
1290
1298
if (!tlmi_priv .setting [i ])
@@ -1322,12 +1330,6 @@ static int tlmi_sysfs_init(void)
1322
1330
}
1323
1331
1324
1332
/* Create authentication entries */
1325
- tlmi_priv .authentication_kset = kset_create_and_add ("authentication" , NULL ,
1326
- & tlmi_priv .class_dev -> kobj );
1327
- if (!tlmi_priv .authentication_kset ) {
1328
- ret = - ENOMEM ;
1329
- goto fail_create_attr ;
1330
- }
1331
1333
tlmi_priv .pwd_admin -> kobj .kset = tlmi_priv .authentication_kset ;
1332
1334
ret = kobject_add (& tlmi_priv .pwd_admin -> kobj , NULL , "%s" , "Admin" );
1333
1335
if (ret )
You can’t perform that action at this time.
0 commit comments