mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
Bluetooth: hci_sync: Fix crash on NULL parent
Although later functions can handle a NULL fwnode, fwnode can't handle being passed a NULL pointer. See: https://github.com/raspberrypi/linux/issues/6305 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
@@ -4929,7 +4929,8 @@ static const struct {
|
||||
*/
|
||||
static int hci_dev_setup_sync(struct hci_dev *hdev)
|
||||
{
|
||||
struct fwnode_handle *fwnode = dev_fwnode(hdev->dev.parent);
|
||||
struct fwnode_handle *fwnode =
|
||||
hdev->dev.parent ? dev_fwnode(hdev->dev.parent) : NULL;
|
||||
int ret = 0;
|
||||
bool invalid_bdaddr;
|
||||
size_t i;
|
||||
|
||||
Reference in New Issue
Block a user