linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth:hci_bcm:Check return value from devm_clk_get
@ 2018-07-17 12:02 RAGHU Halharvi
  0 siblings, 0 replies; 3+ messages in thread
From: RAGHU Halharvi @ 2018-07-17 12:02 UTC (permalink / raw)
  To: inux-bluetooth, linux-kernel, linux-bluetooth
  Cc: RAGHU Halharvi, marcel, johan.hedberg

* Check return value from devm_clk_get & return appropriate error.
---
 drivers/bluetooth/hci_bcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 441f5e1deb11..1295cc89d702 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -910,6 +910,8 @@ static int bcm_get_resources(struct bcm_device *dev)
 		return 0;
 
 	dev->clk = devm_clk_get(dev->dev, NULL);
+	if (IS_ERR(dev->clk))
+		return PTR_ERR(dev->clk);
 
 	dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup",
 						     GPIOD_OUT_LOW);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth:hci_bcm:Check return value from devm_clk_get
  2018-07-17 12:06 ` RAGHU Halharvi
@ 2018-07-18 12:09   ` Marcel Holtmann
  0 siblings, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2018-07-18 12:09 UTC (permalink / raw)
  To: RAGHU Halharvi; +Cc: linux-bluetooth, linux-kernel, Johan Hedberg

Hi Raghu,

> * Check return value from devm_clk_get & return appropriate error.
> ---
> drivers/bluetooth/hci_bcm.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> index 441f5e1deb11..1295cc89d702 100644
> --- a/drivers/bluetooth/hci_bcm.c
> +++ b/drivers/bluetooth/hci_bcm.c
> @@ -910,6 +910,8 @@ static int bcm_get_resources(struct bcm_device *dev)
> 		return 0;
> 
> 	dev->clk = devm_clk_get(dev->dev, NULL);
> +	if (IS_ERR(dev->clk))
> +		return PTR_ERR(dev->clk);

so I assumed this was not done on purpose and allow for dev->clk = NULL since all other clock handling functions will cope with it. Can someone NAK or ACK this patch?

Regards

Marcel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Bluetooth:hci_bcm:Check return value from devm_clk_get
       [not found] <5b4ddae5.1c69fb81.61055.042e.GMRIR@mx.google.com>
@ 2018-07-17 12:06 ` RAGHU Halharvi
  2018-07-18 12:09   ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: RAGHU Halharvi @ 2018-07-17 12:06 UTC (permalink / raw)
  To: linux-bluetooth, linux-kernel; +Cc: RAGHU Halharvi, marcel, johan.hedberg

* Check return value from devm_clk_get & return appropriate error.
---
 drivers/bluetooth/hci_bcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 441f5e1deb11..1295cc89d702 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -910,6 +910,8 @@ static int bcm_get_resources(struct bcm_device *dev)
 		return 0;
 
 	dev->clk = devm_clk_get(dev->dev, NULL);
+	if (IS_ERR(dev->clk))
+		return PTR_ERR(dev->clk);
 
 	dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup",
 						     GPIOD_OUT_LOW);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-18 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 12:02 [PATCH] Bluetooth:hci_bcm:Check return value from devm_clk_get RAGHU Halharvi
     [not found] <5b4ddae5.1c69fb81.61055.042e.GMRIR@mx.google.com>
2018-07-17 12:06 ` RAGHU Halharvi
2018-07-18 12:09   ` Marcel Holtmann

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).