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 @@ -343,6 +343,11 @@ static void otx2_get_pauseparam(struct net_device *netdev,
343
343
if (!otx2_sync_mbox_msg (& pfvf -> mbox )) {
344
344
rsp = (struct cgx_pause_frm_cfg * )
345
345
otx2_mbox_get_rsp (& pfvf -> mbox .mbox , 0 , & req -> hdr );
346
+ if (IS_ERR (rsp )) {
347
+ mutex_unlock (& pfvf -> mbox .lock );
348
+ return ;
349
+ }
350
+
346
351
pause -> rx_pause = rsp -> rx_pause ;
347
352
pause -> tx_pause = rsp -> tx_pause ;
348
353
}
@@ -1072,6 +1077,11 @@ static int otx2_set_fecparam(struct net_device *netdev,
1072
1077
1073
1078
rsp = (struct fec_mode * )otx2_mbox_get_rsp (& pfvf -> mbox .mbox ,
1074
1079
0 , & req -> hdr );
1080
+ if (IS_ERR (rsp )) {
1081
+ err = PTR_ERR (rsp );
1082
+ goto end ;
1083
+ }
1084
+
1075
1085
if (rsp -> fec >= 0 )
1076
1086
pfvf -> linfo .fec = rsp -> fec ;
1077
1087
else
You can’t perform that action at this time.
0 commit comments