Re: [PATCH v3 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend

2012-11-06 Thread Ming Lei
On Tue, Nov 6, 2012 at 9:58 PM, Steve Glendinning wrote: >> BTW, I just saw the smsc95xx datasheet and the vendor's driver >> source code, and found the chip supports runtime PM well >> (remote wakeup on 'good packet' or link change), so do you >> plan to implement that? > > Yes, I do plan to impl

Re: [PATCH v3 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend

2012-11-06 Thread Steve Glendinning
> BTW, I just saw the smsc95xx datasheet and the vendor's driver > source code, and found the chip supports runtime PM well > (remote wakeup on 'good packet' or link change), so do you > plan to implement that? Yes, I do plan to implement this. Note that this feature is only supported on some pro

Re: [PATCH v3 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend

2012-11-06 Thread Ming Lei
On Tue, Nov 6, 2012 at 9:20 PM, Steve Glendinning wrote: > On 6 November 2012 01:45, Ming Lei wrote: >> This patch fixes memory leak in smsc95xx_suspend. > > Good spot, thanks! > > Note that check_warn_return just above your kfree can cause early > return in the error case, which would still leak

Re: [PATCH v3 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend

2012-11-06 Thread Steve Glendinning
On 6 November 2012 01:45, Ming Lei wrote: > This patch fixes memory leak in smsc95xx_suspend. Good spot, thanks! Note that check_warn_return just above your kfree can cause early return in the error case, which would still leak filter_mask, so we might want to explicitly expand that instance of

[PATCH v3 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend

2012-11-05 Thread Ming Lei
This patch fixes memory leak in smsc95xx_suspend. Also, it isn't necessary to bother mm to allocate 8bytes/16byte, and we can use stack variable safely. Cc: Steve Glendinning Signed-off-by: Ming Lei --- drivers/net/usb/smsc95xx.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletion