[PATCH][next] mlxsw: spectrum: fix uninitialized value in err

2017-10-01 Thread Colin King
From: Colin Ian King In the unlikely event that mfc->mfc_un.res.ttls[i] is 255 for all values of i from 0 to MAXIVS-1, the err is not set at all and hence has a garbage value on the error return at the end of the function, so initialize it to 0. Also, the error return check on err and goto to er

Re: [PATCH][next] mlxsw: spectrum: fix uninitialized value in err

2017-10-01 Thread David Miller
From: Colin King Date: Sun, 1 Oct 2017 17:27:35 +0100 > From: Colin Ian King > > In the unlikely event that mfc->mfc_un.res.ttls[i] is 255 for all > values of i from 0 to MAXIVS-1, the err is not set at all and hence > has a garbage value on the error return at the end of the function, > so in

Re: [PATCH][next] mlxsw: spectrum: fix uninitialized value in err

2017-10-01 Thread Yotam Gigi
On 10/01/2017 07:27 PM, Colin King wrote: > From: Colin Ian King > > In the unlikely event that mfc->mfc_un.res.ttls[i] is 255 for all > values of i from 0 to MAXIVS-1, the err is not set at all and hence > has a garbage value on the error return at the end of the function, > so initialize it to 0