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,
343343 if (!otx2_sync_mbox_msg (& pfvf -> mbox )) {
344344 rsp = (struct cgx_pause_frm_cfg * )
345345 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+
346351 pause -> rx_pause = rsp -> rx_pause ;
347352 pause -> tx_pause = rsp -> tx_pause ;
348353 }
@@ -1072,6 +1077,11 @@ static int otx2_set_fecparam(struct net_device *netdev,
10721077
10731078 rsp = (struct fec_mode * )otx2_mbox_get_rsp (& pfvf -> mbox .mbox ,
10741079 0 , & req -> hdr );
1080+ if (IS_ERR (rsp )) {
1081+ err = PTR_ERR (rsp );
1082+ goto end ;
1083+ }
1084+
10751085 if (rsp -> fec >= 0 )
10761086 pfvf -> linfo .fec = rsp -> fec ;
10771087 else
You can’t perform that action at this time.
0 commit comments