aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbshc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sbshc.c')
-rw-r--r--drivers/acpi/sbshc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index ae9a90438e2f..a2cf3008ce6c 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -117,6 +117,11 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
117 int ret = -EFAULT, i; 117 int ret = -EFAULT, i;
118 u8 temp, sz = 0; 118 u8 temp, sz = 0;
119 119
120 if (!hc) {
121 printk(KERN_ERR PREFIX "host controller is not configured\n");
122 return ret;
123 }
124
120 mutex_lock(&hc->lock); 125 mutex_lock(&hc->lock);
121 if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp)) 126 if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
122 goto end; 127 goto end;
@@ -292,6 +297,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type)
292 hc = acpi_driver_data(device); 297 hc = acpi_driver_data(device);
293 acpi_ec_remove_query_handler(hc->ec, hc->query_bit); 298 acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
294 kfree(hc); 299 kfree(hc);
300 acpi_driver_data(device) = NULL;
295 return 0; 301 return 0;
296} 302}
297 303