Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-22 Thread Sergey Matyukevich
> Not related to your patch but qtnf_map_bar() should be changed not to > return NULL. When functions return both NULL and error pointers the > NULL is supposed to be a special type of success return. Here it is > just a fail return where we forgot to set the error code to > ERR_PTR(-ENOMEM).

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-22 Thread Sergey Matyukevich
> Not related to your patch but qtnf_map_bar() should be changed not to > return NULL. When functions return both NULL and error pointers the > NULL is supposed to be a special type of success return. Here it is > just a fail return where we forgot to set the error code to > ERR_PTR(-ENOMEM).

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Dan Carpenter
On Wed, Jun 21, 2017 at 02:25:30PM +0100, Colin King wrote: > From: Colin Ian King > > The return value ret is unitialized and garbage is being returned > for the three different error conditions when setting up the PCIe > BARs. Fix this by initializing ret to -ENOMEM

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Dan Carpenter
On Wed, Jun 21, 2017 at 02:25:30PM +0100, Colin King wrote: > From: Colin Ian King > > The return value ret is unitialized and garbage is being returned > for the three different error conditions when setting up the PCIe > BARs. Fix this by initializing ret to -ENOMEM to indicate that > the

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Colin Ian King
On 21/06/17 14:54, Sergey Matyukevich wrote: >> The return value ret is unitialized and garbage is being returned >> for the three different error conditions when setting up the PCIe >> BARs. Fix this by initializing ret to -ENOMEM to indicate that >> the BARs failed to be setup correctly. >> >>

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Colin Ian King
On 21/06/17 14:54, Sergey Matyukevich wrote: >> The return value ret is unitialized and garbage is being returned >> for the three different error conditions when setting up the PCIe >> BARs. Fix this by initializing ret to -ENOMEM to indicate that >> the BARs failed to be setup correctly. >> >>

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Sergey Matyukevich
> The return value ret is unitialized and garbage is being returned > for the three different error conditions when setting up the PCIe > BARs. Fix this by initializing ret to -ENOMEM to indicate that > the BARs failed to be setup correctly. > > Detected by CoverityScan, CID#1437563

Re: [PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Sergey Matyukevich
> The return value ret is unitialized and garbage is being returned > for the three different error conditions when setting up the PCIe > BARs. Fix this by initializing ret to -ENOMEM to indicate that > the BARs failed to be setup correctly. > > Detected by CoverityScan, CID#1437563

[PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Colin King
From: Colin Ian King The return value ret is unitialized and garbage is being returned for the three different error conditions when setting up the PCIe BARs. Fix this by initializing ret to -ENOMEM to indicate that the BARs failed to be setup correctly. Detected by

[PATCH][net-next] qtnfmac: fix uninitialized return code in ret

2017-06-21 Thread Colin King
From: Colin Ian King The return value ret is unitialized and garbage is being returned for the three different error conditions when setting up the PCIe BARs. Fix this by initializing ret to -ENOMEM to indicate that the BARs failed to be setup correctly. Detected by CoverityScan, CID#1437563