File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
drivers/net/ethernet/marvell/octeontx2/nic Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count)
119
119
120
120
rsp = (struct npc_mcam_alloc_entry_rsp * )otx2_mbox_get_rsp
121
121
(& pfvf -> mbox .mbox , 0 , & req -> hdr );
122
+ if (IS_ERR (rsp ))
123
+ goto exit ;
122
124
123
125
for (ent = 0 ; ent < rsp -> count ; ent ++ )
124
126
flow_cfg -> flow_ent [ent + allocated ] = rsp -> entry_list [ent ];
@@ -197,6 +199,10 @@ int otx2_mcam_entry_init(struct otx2_nic *pfvf)
197
199
198
200
rsp = (struct npc_mcam_alloc_entry_rsp * )otx2_mbox_get_rsp
199
201
(& pfvf -> mbox .mbox , 0 , & req -> hdr );
202
+ if (IS_ERR (rsp )) {
203
+ mutex_unlock (& pfvf -> mbox .lock );
204
+ return PTR_ERR (rsp );
205
+ }
200
206
201
207
if (rsp -> count != req -> count ) {
202
208
netdev_info (pfvf -> netdev ,
@@ -232,6 +238,10 @@ int otx2_mcam_entry_init(struct otx2_nic *pfvf)
232
238
233
239
frsp = (struct npc_get_field_status_rsp * )otx2_mbox_get_rsp
234
240
(& pfvf -> mbox .mbox , 0 , & freq -> hdr );
241
+ if (IS_ERR (frsp )) {
242
+ mutex_unlock (& pfvf -> mbox .lock );
243
+ return PTR_ERR (frsp );
244
+ }
235
245
236
246
if (frsp -> enable ) {
237
247
pfvf -> flags |= OTX2_FLAG_RX_VLAN_SUPPORT ;
You can’t perform that action at this time.
0 commit comments