File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
drivers/infiniband/hw/hfi1 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1227,7 +1227,8 @@ DEBUGFS_FILE_OPS(fault_stats);
1227
1227
1228
1228
static void fault_exit_opcode_debugfs (struct hfi1_ibdev * ibd )
1229
1229
{
1230
- debugfs_remove_recursive (ibd -> fault_opcode -> dir );
1230
+ if (ibd -> fault_opcode )
1231
+ debugfs_remove_recursive (ibd -> fault_opcode -> dir );
1231
1232
kfree (ibd -> fault_opcode );
1232
1233
ibd -> fault_opcode = NULL ;
1233
1234
}
@@ -1255,6 +1256,7 @@ static int fault_init_opcode_debugfs(struct hfi1_ibdev *ibd)
1255
1256
& ibd -> fault_opcode -> attr );
1256
1257
if (IS_ERR (ibd -> fault_opcode -> dir )) {
1257
1258
kfree (ibd -> fault_opcode );
1259
+ ibd -> fault_opcode = NULL ;
1258
1260
return - ENOENT ;
1259
1261
}
1260
1262
@@ -1278,7 +1280,8 @@ static int fault_init_opcode_debugfs(struct hfi1_ibdev *ibd)
1278
1280
1279
1281
static void fault_exit_packet_debugfs (struct hfi1_ibdev * ibd )
1280
1282
{
1281
- debugfs_remove_recursive (ibd -> fault_packet -> dir );
1283
+ if (ibd -> fault_packet )
1284
+ debugfs_remove_recursive (ibd -> fault_packet -> dir );
1282
1285
kfree (ibd -> fault_packet );
1283
1286
ibd -> fault_packet = NULL ;
1284
1287
}
@@ -1304,6 +1307,7 @@ static int fault_init_packet_debugfs(struct hfi1_ibdev *ibd)
1304
1307
& ibd -> fault_opcode -> attr );
1305
1308
if (IS_ERR (ibd -> fault_packet -> dir )) {
1306
1309
kfree (ibd -> fault_packet );
1310
+ ibd -> fault_packet = NULL ;
1307
1311
return - ENOENT ;
1308
1312
}
1309
1313
You can’t perform that action at this time.
0 commit comments