Skip to contentSkip to conversation

Bluetooth:hci_bcm:Check return value from devm_clk_get

PATCH New RAGHU Halharvi 1 participant 1 message Jul 17, 2018 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth:hci_bcm:Check return value from devm_clk_get

* Check return value from devm_clk_get & return appropriate error.

---
 drivers/bluetooth/hci_bcm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_bcm.c +2 -0
index 441f5e1deb11..1295cc89d702 100644
@@ -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);
Signature · 1 line
2.17.1