[PATCH] net: dsa: mt7530: Add some return-value checks

Alex Dewar alex.dewar90 at gmail.com
Wed Sep 16 17:22:13 EDT 2020


[snip] 
> >  
> >  	/* Enable Mediatek header mode on the cpu port */
> >  	mt7530_write(priv, MT7530_PVC_P(port),
> > @@ -2275,7 +2279,7 @@ mt7531_cpu_port_config(struct dsa_switch *ds, int port)
> >  {
> >  	struct mt7530_priv *priv = ds->priv;
> >  	phy_interface_t interface;
> > -	int speed;
> > +	int ret, speed;
> 
> Don't do this. Instead, declare each variable on its own line. In this case,
> speed before ret.

Good point. I'll do this in v2 :-)
> 
> Thanks
> --
> Gustavo



More information about the linux-arm-kernel mailing list