mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tedd Ho-Jeong An <tedd.an@linux.intel.com>
To: Wang ShaoBo <bobo.shaobowang@huawei.com>
Cc: liwei391@huawei.com, marcel@holtmann.org, luiz.dentz@gmail.com,
	johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: btintel: Fix missing free skb in btintel_setup_combined()
Date: Mon, 05 Dec 2022 14:00:18 -0800	[thread overview]
Message-ID: <576a57c3e8d9f7ad5bc28637ceac36d576309ca9.camel@linux.intel.com> (raw)
In-Reply-To: <20221205135357.3961836-1-bobo.shaobowang@huawei.com>

Hi ShaoBo,

On Mon, 2022-12-05 at 21:53 +0800, Wang ShaoBo wrote:
> skb allocated by __hci_cmd_sync would not be used whether in checking
> for supported iBT hardware variants or after, we should free it in all
> error branches, this patch makes the case read version failed or default
> error case free skb before return.
> 
> Fixes: c86c7285bb08 ("Bluetooth: btintel: Fix the legacy bootloader returns tlv based version")
> Fixes: 019a1caa7fd2 ("Bluetooth: btintel: Refactoring setup routine for bootloader devices")
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>

Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>

> ---
>  drivers/bluetooth/btintel.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
> index a657e9a3e96a..f6b4b7a1be4c 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2524,7 +2524,7 @@ static int btintel_setup_combined(struct hci_dev *hdev)
>                  */
>                 err = btintel_read_version(hdev, &ver);
>                 if (err)
> -                       return err;
> +                       break;
>  
>                 /* Apply the device specific HCI quirks
>                  *
> @@ -2566,7 +2566,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
>         default:
>                 bt_dev_err(hdev, "Unsupported Intel hw variant (%u)",
>                            INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
> -               return -EINVAL;
> +               err = -EINVAL;
> +               break;
>         }
>  
>  exit_error:

Regards,
Tedd Ho-Jeong An

  reply	other threads:[~2022-12-05 22:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 13:53 Wang ShaoBo
2022-12-05 22:00 ` Tedd Ho-Jeong An [this message]
2022-12-06 17:50 ` patchwork-bot+bluetooth

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=576a57c3e8d9f7ad5bc28637ceac36d576309ca9.camel@linux.intel.com \
    --to=tedd.an@linux.intel.com \
    --cc=bobo.shaobowang@huawei.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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 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®