File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
drivers/net/ethernet/renesas Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -3217,10 +3217,15 @@ static int ravb_suspend(struct device *dev)
32173217
32183218 netif_device_detach (ndev );
32193219
3220- if (priv -> wol_enabled )
3221- return ravb_wol_setup (ndev );
3220+ rtnl_lock ();
3221+ if (priv -> wol_enabled ) {
3222+ ret = ravb_wol_setup (ndev );
3223+ rtnl_unlock ();
3224+ return ret ;
3225+ }
32223226
32233227 ret = ravb_close (ndev );
3228+ rtnl_unlock ();
32243229 if (ret )
32253230 return ret ;
32263231
@@ -3245,19 +3250,20 @@ static int ravb_resume(struct device *dev)
32453250 if (!netif_running (ndev ))
32463251 return 0 ;
32473252
3253+ rtnl_lock ();
32483254 /* If WoL is enabled restore the interface. */
3249- if (priv -> wol_enabled ) {
3255+ if (priv -> wol_enabled )
32503256 ret = ravb_wol_restore (ndev );
3251- if (ret )
3252- return ret ;
3253- } else {
3257+ else
32543258 ret = pm_runtime_force_resume (dev );
3255- if (ret )
3256- return ret ;
3259+ if (ret ) {
3260+ rtnl_unlock ();
3261+ return ret ;
32573262 }
32583263
32593264 /* Reopening the interface will restore the device to the working state. */
32603265 ret = ravb_open (ndev );
3266+ rtnl_unlock ();
32613267 if (ret < 0 )
32623268 goto out_rpm_put ;
32633269
You can’t perform that action at this time.
0 commit comments