Devicetree
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: devicetree@vger.kernel.org, Archie Pusaka <apusaka@google.com>
Subject: Re: [PATCH] Bluetooth: hci_h5: directly return hci_uart_register_device() ret-val
Date: Fri, 24 Sep 2021 11:42:20 +0200	[thread overview]
Message-ID: <654f45da-d03a-019b-3d54-1f18360283f6@redhat.com> (raw)
In-Reply-To: <20210924094106.32505-1-hdegoede@redhat.com>

Hi,

I accidentally send this to the device-tree list instead of to the
bluetooth list. So I'm going to resend this now to the right list.

Note the second copy you will receive is unchanged, I'm just fixing the
Cc.

Regards,

Hans


On 9/24/21 11:41 AM, Hans de Goede wrote:
> Since the hci_uart_register_device() call is the last thing we do in
> h5_serdev_probe() we can simply directly return its return-value.
> 
> Cc: Archie Pusaka <apusaka@google.com>
> Suggested-by: Archie Pusaka <apusaka@google.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/bluetooth/hci_h5.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
> index 59b712742d33..3e067c7cabff 100644
> --- a/drivers/bluetooth/hci_h5.c
> +++ b/drivers/bluetooth/hci_h5.c
> @@ -814,7 +814,6 @@ static int h5_serdev_probe(struct serdev_device *serdev)
>  	struct device *dev = &serdev->dev;
>  	struct h5 *h5;
>  	const struct h5_device_data *data;
> -	int err;
>  
>  	h5 = devm_kzalloc(dev, sizeof(*h5), GFP_KERNEL);
>  	if (!h5)
> @@ -858,11 +857,7 @@ static int h5_serdev_probe(struct serdev_device *serdev)
>  	if (IS_ERR(h5->device_wake_gpio))
>  		return PTR_ERR(h5->device_wake_gpio);
>  
> -	err = hci_uart_register_device(&h5->serdev_hu, &h5p);
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return hci_uart_register_device(&h5->serdev_hu, &h5p);
>  }
>  
>  static void h5_serdev_remove(struct serdev_device *serdev)
> 


      reply	other threads:[~2021-09-24  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  9:41 [PATCH] Bluetooth: hci_h5: directly return hci_uart_register_device() ret-val Hans de Goede
2021-09-24  9:42 ` Hans de Goede [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=654f45da-d03a-019b-3d54-1f18360283f6@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=apusaka@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=johan.hedberg@gmail.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