Protect the dev member assignment in ->remove() since user may potentially call
unbind from a sysfs even if the driver is built-in. The latter might be racy
with ongoing SCU communication.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
{
struct intel_scu_ipc_dev *scu = pci_get_drvdata(pdev);
{
struct intel_scu_ipc_dev *scu = pci_get_drvdata(pdev);
+ mutex_unlock(&ipclock);
+
iounmap(scu->i2c_base);
intel_scu_devices_destroy();
}
iounmap(scu->i2c_base);
intel_scu_devices_destroy();
}