Function bcm_get_resources() defined in drivers/bluetooth/hci_bcm.c calls devm_clk_get() which may return ERR_PTR(-ENOMEM). However, bcm_get_resources() misses the return value check of devm_clk_get(). Codes related to this bug are shown as follows. drivers/bluetooth/hci_bcm.c: 906 return 0; 907 908: dev->clk = devm_clk_get(dev->dev, NULL); 909 910 dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup", 911 GPIOD_OUT_LOW);
We have sent the patch to the developers. Currently, we're formatting the patch according to the Linux development documentation.