mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Thomas Zimmermann <tzimmermann@suse.de>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Javier Martinez Canillas <javierm@redhat.com>
Subject: drivers/gpu/drm/display/drm_hdcp_helper.c:254 drm_hdcp_request_srm() error: uninitialized symbol 'fw'.
Date: Mon, 19 Sep 2022 12:19:34 +0300	[thread overview]
Message-ID: <202209191450.Y4sMY2Om-lkp@intel.com> (raw)

Hi Thomas,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   521a547ced6477c54b4b0cc206000406c221b4d6
commit: 6a99099fe1d6c46cbcd74298eeb386c4b9048f77 drm/display: Move HDCP helpers into display-helper module
config: arc-randconfig-m041-20220919 (https://download.01.org/0day-ci/archive/20220919/202209191450.Y4sMY2Om-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/display/drm_hdcp_helper.c:254 drm_hdcp_request_srm() error: uninitialized symbol 'fw'.

vim +/fw +254 drivers/gpu/drm/display/drm_hdcp_helper.c

79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  233  static int drm_hdcp_request_srm(struct drm_device *drm_dev,
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  234  				u8 **revoked_ksv_list, u32 *revoked_ksv_cnt)
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  235  {
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  236  	char fw_name[36] = "display_hdcp_srm.bin";
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  237  	const struct firmware *fw;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  238  	int ret;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  239  
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  240  	ret = request_firmware_direct(&fw, (const char *)fw_name,
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  241  				      drm_dev->dev);
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  242  	if (ret < 0) {
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  243  		*revoked_ksv_cnt = 0;
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  244  		*revoked_ksv_list = NULL;
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  245  		ret = 0;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  246  		goto exit;

"fw" isn't initialized so this will crash.  Just "return 0;"

5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  247  	}
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  248  
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  249  	if (fw->size && fw->data)
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  250  		ret = drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  251  					  revoked_ksv_cnt);
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  252  
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  253  exit:
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07 @254  	release_firmware(fw);
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  255  	return ret;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  256  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


                 reply	other threads:[~2022-09-19  9:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202209191450.Y4sMY2Om-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=javierm@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tzimmermann@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®