From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: net/bluetooth/hci_request.c:3350 hci_req_configure_datapath() error: uninitialized symbol 'vnd_len'.
Date: Wed, 08 Dec 2021 10:03:06 +0800 [thread overview]
Message-ID: <202112080946.4eVd3xeE-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3786 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kiran K <kiran.k@intel.com>
CC: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9798fbdee88a893758f1432efdfe498ae410aab8 Bluetooth: Configure codec for HFP offload use case
date: 3 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-m021-20211206 (https://download.01.org/0day-ci/archive/20211208/202112080946.4eVd3xeE-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
net/bluetooth/hci_request.c:3350 hci_req_configure_datapath() error: uninitialized symbol 'vnd_len'.
vim +/vnd_len +3350 net/bluetooth/hci_request.c
9798fbdee88a89 Kiran K 2021-09-07 3335
9798fbdee88a89 Kiran K 2021-09-07 3336 int hci_req_configure_datapath(struct hci_dev *hdev, struct bt_codec *codec)
9798fbdee88a89 Kiran K 2021-09-07 3337 {
9798fbdee88a89 Kiran K 2021-09-07 3338 struct hci_request req;
9798fbdee88a89 Kiran K 2021-09-07 3339 int err;
9798fbdee88a89 Kiran K 2021-09-07 3340 __u8 vnd_len, *vnd_data = NULL;
9798fbdee88a89 Kiran K 2021-09-07 3341 struct hci_op_configure_data_path *cmd = NULL;
9798fbdee88a89 Kiran K 2021-09-07 3342
9798fbdee88a89 Kiran K 2021-09-07 3343 hci_req_init(&req, hdev);
9798fbdee88a89 Kiran K 2021-09-07 3344
9798fbdee88a89 Kiran K 2021-09-07 3345 err = hdev->get_codec_config_data(hdev, ESCO_LINK, codec, &vnd_len,
9798fbdee88a89 Kiran K 2021-09-07 3346 &vnd_data);
9798fbdee88a89 Kiran K 2021-09-07 3347 if (err < 0)
9798fbdee88a89 Kiran K 2021-09-07 3348 goto error;
9798fbdee88a89 Kiran K 2021-09-07 3349
9798fbdee88a89 Kiran K 2021-09-07 @3350 cmd = kzalloc(sizeof(*cmd) + vnd_len, GFP_KERNEL);
9798fbdee88a89 Kiran K 2021-09-07 3351 if (!cmd) {
9798fbdee88a89 Kiran K 2021-09-07 3352 err = -ENOMEM;
9798fbdee88a89 Kiran K 2021-09-07 3353 goto error;
9798fbdee88a89 Kiran K 2021-09-07 3354 }
9798fbdee88a89 Kiran K 2021-09-07 3355
9798fbdee88a89 Kiran K 2021-09-07 3356 err = hdev->get_data_path_id(hdev, &cmd->data_path_id);
9798fbdee88a89 Kiran K 2021-09-07 3357 if (err < 0)
9798fbdee88a89 Kiran K 2021-09-07 3358 goto error;
9798fbdee88a89 Kiran K 2021-09-07 3359
9798fbdee88a89 Kiran K 2021-09-07 3360 cmd->vnd_len = vnd_len;
9798fbdee88a89 Kiran K 2021-09-07 3361 memcpy(cmd->vnd_data, vnd_data, vnd_len);
9798fbdee88a89 Kiran K 2021-09-07 3362
9798fbdee88a89 Kiran K 2021-09-07 3363 cmd->direction = 0x00;
9798fbdee88a89 Kiran K 2021-09-07 3364 hci_req_add(&req, HCI_CONFIGURE_DATA_PATH, sizeof(*cmd) + vnd_len, cmd);
9798fbdee88a89 Kiran K 2021-09-07 3365
9798fbdee88a89 Kiran K 2021-09-07 3366 cmd->direction = 0x01;
9798fbdee88a89 Kiran K 2021-09-07 3367 hci_req_add(&req, HCI_CONFIGURE_DATA_PATH, sizeof(*cmd) + vnd_len, cmd);
9798fbdee88a89 Kiran K 2021-09-07 3368
9798fbdee88a89 Kiran K 2021-09-07 3369 err = hci_req_run(&req, config_data_path_complete);
9798fbdee88a89 Kiran K 2021-09-07 3370 error:
9798fbdee88a89 Kiran K 2021-09-07 3371
9798fbdee88a89 Kiran K 2021-09-07 3372 kfree(cmd);
9798fbdee88a89 Kiran K 2021-09-07 3373 kfree(vnd_data);
9798fbdee88a89 Kiran K 2021-09-07 3374 return err;
9798fbdee88a89 Kiran K 2021-09-07 3375 }
9798fbdee88a89 Kiran K 2021-09-07 3376
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2021-12-08 2:03 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=202112080946.4eVd3xeE-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.