Linux bluetooth development
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Zijun Hu <zijun.hu@oss.qualcomm.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [bug report] Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072
Date: Sat, 19 Sep 2026 13:43:34 +0300	[thread overview]
Message-ID: <aq5nVkN4TvIJNh4y@stanley.mountain> (raw)
In-Reply-To: <988c4737-16a8-4c79-b3d6-e96de8dd174d@oss.qualcomm.com>

On Sat, Sep 19, 2026 at 03:04:06PM +0800, Zijun Hu wrote:
> On 9/19/2026 1:07 PM, Dan Carpenter wrote:
> > Zero, sure.
> > 
> >    268  
> >    269          if (IS_ERR(skb)) {
> >    270                  if (!event)
> >    271                          bt_dev_err(hdev, "Opcode 0x%4.4x failed: %ld", opcode,
> >    272                                     PTR_ERR(skb));
> >    273                  return PTR_ERR(skb);
> >                         ^^^^^^^^^^^^^^^^^^^
> > Error pointer.  Fine.
> > 
> >    274          }
> >    275  
> >    276          status = skb->data[0];
> >    277  
> >    278          kfree_skb(skb);
> >    279  
> >    280          return status;
> >                 ^^^^^^^^^^^^^
> > But this seems like it could be a positive...
> > 
> 
> For HCI_OP_RESET, execution cannot reach this point when status != 0.
> 
> >    281  }

Actually even for the other opcodes it looks like doing:

	status = skb->data[0];
	return status;

is just a more complicated way to write "return 0;".  :/

regards,
dan carpenter

      reply	other threads:[~2026-09-19 10:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 19:15 [bug report] Bluetooth: btusb: Add support for Qualcomm multi-subsystem QCC2072 Dan Carpenter
2026-09-17 19:17 ` Dan Carpenter
2026-09-19  2:36   ` Zijun Hu
2026-09-19  5:07     ` Dan Carpenter
2026-09-19  7:04       ` Zijun Hu
2026-09-19 10:43         ` Dan Carpenter [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=aq5nVkN4TvIJNh4y@stanley.mountain \
    --to=error27@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=zijun.hu@oss.qualcomm.com \
    /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