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 @@ -1179,7 +1179,8 @@ DEBUGFS_FILE_OPS(fault_stats);
1179
1179
1180
1180
static void fault_exit_opcode_debugfs (struct hfi1_ibdev * ibd )
1181
1181
{
1182
- debugfs_remove_recursive (ibd -> fault_opcode -> dir );
1182
+ if (ibd -> fault_opcode )
1183
+ debugfs_remove_recursive (ibd -> fault_opcode -> dir );
1183
1184
kfree (ibd -> fault_opcode );
1184
1185
ibd -> fault_opcode = NULL ;
1185
1186
}
@@ -1207,6 +1208,7 @@ static int fault_init_opcode_debugfs(struct hfi1_ibdev *ibd)
1207
1208
& ibd -> fault_opcode -> attr );
1208
1209
if (IS_ERR (ibd -> fault_opcode -> dir )) {
1209
1210
kfree (ibd -> fault_opcode );
1211
+ ibd -> fault_opcode = NULL ;
1210
1212
return - ENOENT ;
1211
1213
}
1212
1214
@@ -1230,7 +1232,8 @@ static int fault_init_opcode_debugfs(struct hfi1_ibdev *ibd)
1230
1232
1231
1233
static void fault_exit_packet_debugfs (struct hfi1_ibdev * ibd )
1232
1234
{
1233
- debugfs_remove_recursive (ibd -> fault_packet -> dir );
1235
+ if (ibd -> fault_packet )
1236
+ debugfs_remove_recursive (ibd -> fault_packet -> dir );
1234
1237
kfree (ibd -> fault_packet );
1235
1238
ibd -> fault_packet = NULL ;
1236
1239
}
@@ -1256,6 +1259,7 @@ static int fault_init_packet_debugfs(struct hfi1_ibdev *ibd)
1256
1259
& ibd -> fault_opcode -> attr );
1257
1260
if (IS_ERR (ibd -> fault_packet -> dir )) {
1258
1261
kfree (ibd -> fault_packet );
1262
+ ibd -> fault_packet = NULL ;
1259
1263
return - ENOENT ;
1260
1264
}
1261
1265
You can’t perform that action at this time.
0 commit comments