Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1379326

Re: [PATCH] media: saa7134 fix media_dev alloc error path to not free when alloc fails

From Shuah Khan <shuah.kh@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH] media: saa7134 fix media_dev alloc error path to not free when alloc fails
Date 2016-04-15 00:20 +0200
Message-ID <rnXMe-UY-21@gated-at.bofh.it> (permalink)
References <rnStc-4TB-21@gated-at.bofh.it> <rnWGu-5f-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] media: saa7134 fix media_dev alloc error path to not free when alloc fails Shuah Khan <shuahkh@osg.samsung.com> - 2016-04-14 18:40 +0200
  Re: [PATCH] media: saa7134 fix media_dev alloc error path to not  free when alloc fails Mauro Carvalho Chehab <mchehab@osg.samsung.com> - 2016-04-14 23:10 +0200
    Re: [PATCH] media: saa7134 fix media_dev alloc error path to not free  when alloc fails Shuah Khan <shuah.kh@samsung.com> - 2016-04-15 00:20 +0200
      Re: [PATCH] media: saa7134 fix media_dev alloc error path to not  free when alloc fails Mauro Carvalho Chehab <mchehab@osg.samsung.com> - 2016-04-15 11:50 +0200

csiph-web