All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: kbuild-all@01.org,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Jiri Kosina <jkosina@suse.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH v2] [media] au8522: Avoid memory leak for device config data
Date: Tue, 22 Dec 2015 01:35:04 +0800	[thread overview]
Message-ID: <201512220109.Stn6tqMn%fengguang.wu@intel.com> (raw)
In-Reply-To: <177d26a15571eba1a797ec1e2f2392acd2fadd0d.1450717344.git.mchehab@osg.samsung.com>

[-- Attachment #1: Type: text/plain, Size: 4412 bytes --]

Hi Mauro,

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.4-rc6 next-20151221]

url:    https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/au8522-Avoid-memory-leak-for-device-config-data/20151222-010649
base:   git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-x000-201551 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/media/dvb-frontends/au8522_decoder.c: In function 'au8522_probe':
>> drivers/media/dvb-frontends/au8522_decoder.c:779:3: warning: 'demod_config' may be used uninitialized in this function [-Wmaybe-uninitialized]
      kfree(demod_config);
      ^

vim +/demod_config +779 drivers/media/dvb-frontends/au8522_decoder.c

5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  763  	hdl = &state->hdl;
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  764  	v4l2_ctrl_handler_init(hdl, 4);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  765  	v4l2_ctrl_new_std(hdl, &au8522_ctrl_ops,
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  766  			V4L2_CID_BRIGHTNESS, 0, 255, 1, 109);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  767  	v4l2_ctrl_new_std(hdl, &au8522_ctrl_ops,
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  768  			V4L2_CID_CONTRAST, 0, 255, 1,
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  769  			AU8522_TVDEC_CONTRAST_REG00BH_CVBS);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  770  	v4l2_ctrl_new_std(hdl, &au8522_ctrl_ops,
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  771  			V4L2_CID_SATURATION, 0, 255, 1, 128);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  772  	v4l2_ctrl_new_std(hdl, &au8522_ctrl_ops,
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  773  			V4L2_CID_HUE, -32768, 32767, 1, 0);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  774  	sd->ctrl_handler = hdl;
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  775  	if (hdl->error) {
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  776  		int err = hdl->error;
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  777  
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  778  		v4l2_ctrl_handler_free(hdl);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15 @779  		kfree(demod_config);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  780  		kfree(state);
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  781  		return err;
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  782  	}
5a4bdb4b drivers/media/dvb-frontends/au8522_decoder.c Hans Verkuil          2013-02-15  783  
968cf782 drivers/media/dvb/frontends/au8522_decoder.c Devin Heitmueller     2009-03-11  784  	state->c = client;
f2fd7ce6 drivers/media/dvb-frontends/au8522_decoder.c Mauro Carvalho Chehab 2014-06-08  785  	state->std = V4L2_STD_NTSC_M;
968cf782 drivers/media/dvb/frontends/au8522_decoder.c Devin Heitmueller     2009-03-11  786  	state->vid_input = AU8522_COMPOSITE_CH1;
968cf782 drivers/media/dvb/frontends/au8522_decoder.c Devin Heitmueller     2009-03-11  787  	state->aud_input = AU8522_AUDIO_NONE;

:::::: The code at line 779 was first introduced by commit
:::::: 5a4bdb4b34b90655891f627679bbba0ed9791c2e [media] au8522_decoder: convert to the control framework

:::::: TO: Hans Verkuil <hans.verkuil@cisco.com>
:::::: CC: Mauro Carvalho Chehab <mchehab@redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 25195 bytes --]

      reply	other threads:[~2015-12-21 17:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 17:02 [PATCH v2] [media] au8522: Avoid memory leak for device config data Mauro Carvalho Chehab
2015-12-21 17:35 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201512220109.Stn6tqMn%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=jkosina@suse.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kbuild-all@01.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    --cc=stefanr@s5r6.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.