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

2020-09-24 Thread Landen Chao
On Thu, 2020-09-24 at 14:11 +0100, Alex Dewar wrote: > On 2020-09-24 13:13, Landen Chao wrote: > > Hi Alex, > > > > Thanks for your patch. By linux/scripts/checkpatch.pl > > > > On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote: > > [..] > >> @@ -1631,9 +1635,11 @@ mt7530_setup(struct dsa_switch

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

2020-09-24 Thread Alex Dewar
On 2020-09-24 13:13, Landen Chao wrote: Hi Alex, Thanks for your patch. By linux/scripts/checkpatch.pl On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote: [..] @@ -1631,9 +1635,11 @@ mt7530_setup(struct dsa_switch *ds) mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,

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

2020-09-24 Thread Landen Chao
Hi Alex, Thanks for your patch. By linux/scripts/checkpatch.pl On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote: [..] > @@ -1631,9 +1635,11 @@ mt7530_setup(struct dsa_switch *ds) > mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, > PCR_MATRIX_CLR); >

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

2020-09-19 Thread Alex Dewar
In mt7531_cpu_port_config(), if the variable port is neither 5 nor 6, then variable interface will be used uninitialised. Change the function to return -EINVAL in this case. As the return value of mt7531_cpu_port_config() is never checked (even though it returns an int) add a check in the correct