Re: [PATCH v5 2/2] Bluetooth: hci_intel: Add platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,


@@ -100,6 +190,13 @@ static int intel_close(struct hci_uart *hu)

	BT_DBG("hu %p", hu);

+	intel_set_power(hu, false);
+
+	spin_lock(&intel_device_list_lock);
+	if (intel_device_exists(intel->idev))
+		intel->idev->hu = NULL;

Why are you checking here if it exists? Just set idev->hu = NULL unconditionally.

If I'm not wrong, idev could have been freed due to pdev removing.
So we don't want to deref idev unconditionally.
We always need to check intel->idev.

Regards,
Loic

--
Intel Open Source Technology Center
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux