From: Marcel Holtmann <marcel@holtmann.org>
To: Aditya Pakki <pakki001@umn.edu>
Cc: kjlu@umn.edu, Johan Hedberg <johan.hedberg@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bluetooth: hci_bcm: Check for driver_register failure
Date: Fri, 18 Jan 2019 11:59:28 +0100 [thread overview]
Message-ID: <A6573C2B-CEA7-4B48-B812-B76D01E175AC@holtmann.org> (raw)
In-Reply-To: <20181228194827.10504-1-pakki001@umn.edu>
Hi Aditya,
> While initializing the driver, the function platform_driver_register can
> fail and return an error. Consistent with other invocations, this patch
> returns the error upstream.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> drivers/bluetooth/hci_bcm.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> index ddbe518c3e5b..f5ddb0f19c31 100644
> --- a/drivers/bluetooth/hci_bcm.c
> +++ b/drivers/bluetooth/hci_bcm.c
> @@ -1442,7 +1442,12 @@ int __init bcm_init(void)
> /* For now, we need to keep both platform device
> * driver (ACPI generated) and serdev driver (DT).
> */
> - platform_driver_register(&bcm_driver);
> + int rc;
> +
> + rc = platform_driver_register(&bcm_driver);
> + if (rc)
> + return rc;
> +
actually I am fine with ignoring the error here since the usage of a platform device should be removed at some point. It was sort of a hack before we had proper ACPI integration and serdev support.
Regards
Marcel
prev parent reply other threads:[~2019-01-18 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 19:48 [PATCH] bluetooth: hci_bcm: Check for driver_register failure Aditya Pakki
2019-01-18 10:59 ` Marcel Holtmann [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=A6573C2B-CEA7-4B48-B812-B76D01E175AC@holtmann.org \
--to=marcel@holtmann.org \
--cc=johan.hedberg@gmail.com \
--cc=kjlu@umn.edu \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pakki001@umn.edu \
/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;
as well as URLs for NNTP newsgroup(s).