Use kmemdup rather than duplicating its implementation.
Signed-off-by: Ji-Hun Kim
---
drivers/staging/ks7010/ks7010_sdio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c
b/drivers/staging/ks7010/ks7010_sdio.c
index b8f55a1..c8eb55b
There was no code for handling memory leaks of device_init_rings() and
request_irq(). It needs to free allocated memory in the device_init_rings()
, when request_irq() would be failed. Add freeing sequences of irq and
device init rings.
Signed-off-by: Ji-Hun Kim
---
It's additional memory
There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Implement error handling code on device_init_rd*, device_init_td*
and vnt_start for the allocation failures.
Signed-off-by: Ji-Hun Kim
---
Changes
On Tue, Apr 03, 2018 at 01:40:52PM +0300, Dan Carpenter wrote:
> > desc->rd_info = kzalloc(sizeof(*desc->rd_info), GFP_KERNEL);
> > -
> > + if (!desc->rd_info) {
> > + ret = -ENOMEM;
> > + goto error;
> > + }
> > if (!d
There was no code for handling memory leaks of device_init_rings() and
request_irq(). It needs to free allocated memory in the device_init_rings()
, when request_irq() is failed. Add freeing sequences of irq and device
init rings.
Signed-off-by: Ji-Hun Kim
---
It's additional memory
There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Implement error handling code on device_init_rd*, device_init_td*
and vnt_start for the allocation failures.
Signed-off-by: Ji-Hun Kim
---
Changes
On Fri, Mar 30, 2018 at 11:15:03AM +0800, Jia-Ju Bai wrote:
>
>
> On 2018/3/30 10:44, Ji-Hun Kim wrote:
> >@@ -1165,10 +1205,18 @@ static int vnt_start(struct ieee80211_hw *hw)
> > }
> > dev_dbg(&priv->pcid->dev, "call device init rd0 r
On Fri, Mar 30, 2018 at 11:15:03AM +0800, Jia-Ju Bai wrote:
>
>
> On 2018/3/30 10:44, Ji-Hun Kim wrote:
> >@@ -1165,10 +1205,18 @@ static int vnt_start(struct ieee80211_hw *hw)
> > }
> > dev_dbg(&priv->pcid->dev, "call device init rd0 r
There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Implement error handling code on device_init_rd*, device_init_td*
and vnt_start for the allocation failures.
Signed-off-by: Ji-Hun Kim
---
Changes
2018-03-29 17:00 GMT+09:00 Jia-Ju Bai :
>
>
>
> On 2018/3/29 15:22, Ji-Hun Kim wrote:
>>
>> There are no null pointer checking on rd_info and td_info values which
>> are allocated by kzalloc. It has potential null pointer dereferencing
>> issues. Add return whe
There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Add return when allocation is failed.
Signed-off-by: Ji-Hun Kim
---
Change: since v1:
- Delete WARN_ON which can makes crashes on some machines
On Wed, Mar 28, 2018 at 05:55:57PM +0800, Jia-Ju Bai wrote:
> >@@ -646,7 +649,8 @@ static void device_init_td1_ring(struct vnt_private
> >*priv)
> > i++, curr += sizeof(struct vnt_tx_desc)) {
> > desc = &priv->apTD1Rings[i];
> > desc->td_info = kzalloc(sizeof(*desc
There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Add return when allocation is failed.
Signed-off-by: Ji-Hun Kim
---
drivers/staging/vt6655/device_main.c | 12
1 file changed, 8
On Wed, Mar 21, 2018 at 01:39:09PM +0900, Ji-Hun Kim wrote:
> There is no failure checking on the param value which will be allocated
> memory by kmalloc. Add a null pointer checking statement. Then goto error:
> and return -ENOMEM error code when kmalloc is failed.
>
> Signed-off
It needs to free of allocated params value in the goto error statement.
Signed-off-by: Ji-Hun Kim
---
Changes since v2:
- add kfree(params) on the error case of the function
- rename unclear goto statement name
- declare the params value at start of the function, so it can be free
end
There is no failure checking on the param value which will be allocated
memory by kmalloc. Add a null pointer checking statement. Then goto error:
and return -ENOMEM error code when kmalloc is failed.
Signed-off-by: Ji-Hun Kim
---
Changes since v1:
- Return with -ENOMEM directly, instead of
There is no failure checking on the param value which will be allocated
memory by kmalloc. Add a null pointer checking statement. Then goto error:
and return -ENOMEM error code when kmalloc is failed.
Signed-off-by: Ji-Hun Kim
---
Changes since v1:
- Return with -ENOMEM directly, instead of
On Fri, Mar 16, 2018 at 11:32:34AM +0300, Dan Carpenter wrote:
> On Fri, Mar 16, 2018 at 01:58:23PM +0900, Ji-Hun Kim wrote:
> > There is no failure checking on the param value which will be allocated
> > memory by kmalloc. Add a null pointer checking statement. Then goto error:
There is no failure checking on the param value which will be allocated
memory by kmalloc. Add a null pointer checking statement. Then goto error:
and return -ENOMEM error code when kmalloc is failed.
Signed-off-by: Ji-Hun Kim
---
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 8
1
Clean up checkpatch error:
ERROR: do not initialise globals to 0
Signed-off-by: Ji-Hun Kim
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c
b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index
Clean up checkpatch warning:
CHECK: spaces preferred around that '-' (ctx:VxV)
Signed-off-by: Ji-Hun Kim
---
drivers/staging/iio/adc/ad7192.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
ind
Clean up checkpatch warning:
CHECK: Unnecessary parentheses around 'st->devid != ID_AD7195'
Signed-off-by: Ji-Hun Kim
---
drivers/staging/iio/adc/ad7192.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio
Clean up checkpatch warning:
CHECK: multiple assignments should be avoided
Signed-off-by: JI-HUN KIM
---
drivers/staging/irda/drivers/esi-sir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/irda/drivers/esi-sir.c
b/drivers/staging/irda/drivers/esi-sir.c
Clean up checkpatch warning:
CHECK: spaces preferred around that '|' (ctx:VxV)
Signed-off-by: JI-HUN KIM
---
drivers/staging/irda/drivers/esi-sir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/irda/drivers/esi-sir.c
b/drivers/staging/irda/d
Clean up checkpatch warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: JI-HUN KIM
---
drivers/staging/irda/drivers/esi-sir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/irda/drivers/esi-sir.c
b/
25 matches
Mail list logo