lkml.org 
[lkml]   [2016]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] media: saa7134 fix media_dev alloc error path to not free when alloc fails
From
Date
On 04/14/2016 03:08 PM, Mauro Carvalho Chehab wrote:
> Em Thu, 14 Apr 2016 10:31:20 -0600
> Shuah Khan <shuahkh@osg.samsung.com> escreveu:
>
>> media_dev alloc error path does kfree when alloc fails. Fix it to not call
>> kfree when media_dev alloc fails.
>
> No need. kfree(NULL) is OK.

Agreed.

>
> Adding a label inside a conditional block is ugly.

In this case, if label is in normal path, we will see defined, but not
used warnings when condition isn't defined. We seem to have many such
cases for CONFIG_MEDIA_CONTROLLER :(

thanks,
-- Shuah


--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 217-8978

\
 
 \ /
  Last update: 2016-04-15 00:41    [W:3.745 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site