Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-10 Thread Dan Carpenter
On Sat, Oct 10, 2020 at 04:18:11PM +0300, Dan Carpenter wrote: > On Sat, Oct 10, 2020 at 02:07:13PM +0200, Jérôme Pouiller wrote: > > On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote: > > > CAUTION: This email originated from outside of the organization. Do not > > > click links or open

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-10 Thread Dan Carpenter
On Sat, Oct 10, 2020 at 02:07:13PM +0200, Jérôme Pouiller wrote: > On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you recognize the sender and know > > the content is

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-10 Thread Jérôme Pouiller
On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Jerome Pouiller writes: > > > From: Jérôme Pouiller > >

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-09 Thread Kalle Valo
Jerome Pouiller writes: > From: Jérôme Pouiller > > Smatch complains: > >main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference > 'tmp_buf' >227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); >228 ret = wfx_send_pds(wdev, tmp_buf,

[PATCH 2/8] staging: wfx: check memory allocation

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf' 227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); 228 ret = wfx_send_pds(wdev, tmp_buf, pds->size);