aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/macio-adb.c1
-rw-r--r--drivers/macintosh/smu.c4
-rw-r--r--drivers/macintosh/therm_adt746x.c2
-rw-r--r--drivers/macintosh/windfarm_pm81.c8
-rw-r--r--drivers/macintosh/windfarm_pm91.c9
5 files changed, 12 insertions, 12 deletions
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index 79119f56e82d..bd6da7a9c55b 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -155,6 +155,7 @@ static int macio_adb_reset_bus(void)
155 while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) { 155 while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) {
156 if (--timeout == 0) { 156 if (--timeout == 0) {
157 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST); 157 out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST);
158 spin_unlock_irqrestore(&macio_lock, flags);
158 return -1; 159 return -1;
159 } 160 }
160 } 161 }
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index ef1f3330a10e..2506c957712e 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -1186,8 +1186,10 @@ static ssize_t smu_read_command(struct file *file, struct smu_private *pp,
1186 return -EOVERFLOW; 1186 return -EOVERFLOW;
1187 spin_lock_irqsave(&pp->lock, flags); 1187 spin_lock_irqsave(&pp->lock, flags);
1188 if (pp->cmd.status == 1) { 1188 if (pp->cmd.status == 1) {
1189 if (file->f_flags & O_NONBLOCK) 1189 if (file->f_flags & O_NONBLOCK) {
1190 spin_unlock_irqrestore(&pp->lock, flags);
1190 return -EAGAIN; 1191 return -EAGAIN;
1192 }
1191 add_wait_queue(&pp->wait, &wait); 1193 add_wait_queue(&pp->wait, &wait);
1192 for (;;) { 1194 for (;;) {
1193 set_current_state(TASK_INTERRUPTIBLE); 1195 set_current_state(TASK_INTERRUPTIBLE);
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index c42eeb43042d..16d82f17ae82 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -182,6 +182,7 @@ remove_thermostat(struct i2c_client *client)
182 182
183 thermostat = NULL; 183 thermostat = NULL;
184 184
185 i2c_set_clientdata(client, NULL);
185 kfree(th); 186 kfree(th);
186 187
187 return 0; 188 return 0;
@@ -399,6 +400,7 @@ static int probe_thermostat(struct i2c_client *client,
399 rc = read_reg(th, CONFIG_REG); 400 rc = read_reg(th, CONFIG_REG);
400 if (rc < 0) { 401 if (rc < 0) {
401 dev_err(&client->dev, "Thermostat failed to read config!\n"); 402 dev_err(&client->dev, "Thermostat failed to read config!\n");
403 i2c_set_clientdata(client, NULL);
402 kfree(th); 404 kfree(th);
403 return -ENODEV; 405 return -ENODEV;
404 } 406 }
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c
index 565d5b2adc95..749d174b0dc6 100644
--- a/drivers/macintosh/windfarm_pm81.c
+++ b/drivers/macintosh/windfarm_pm81.c
@@ -188,7 +188,7 @@ struct wf_smu_sys_fans_state {
188}; 188};
189 189
190/* 190/*
191 * Configs for SMU Sytem Fan control loop 191 * Configs for SMU System Fan control loop
192 */ 192 */
193static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = { 193static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = {
194 /* Model ID 2 */ 194 /* Model ID 2 */
@@ -757,10 +757,8 @@ static int __devexit wf_smu_remove(struct platform_device *ddev)
757 wf_put_control(cpufreq_clamp); 757 wf_put_control(cpufreq_clamp);
758 758
759 /* Destroy control loops state structures */ 759 /* Destroy control loops state structures */
760 if (wf_smu_sys_fans) 760 kfree(wf_smu_sys_fans);
761 kfree(wf_smu_sys_fans); 761 kfree(wf_smu_cpu_fans);
762 if (wf_smu_cpu_fans)
763 kfree(wf_smu_cpu_fans);
764 762
765 return 0; 763 return 0;
766} 764}
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c
index bea99168ff35..344273235124 100644
--- a/drivers/macintosh/windfarm_pm91.c
+++ b/drivers/macintosh/windfarm_pm91.c
@@ -687,12 +687,9 @@ static int __devexit wf_smu_remove(struct platform_device *ddev)
687 wf_put_control(cpufreq_clamp); 687 wf_put_control(cpufreq_clamp);
688 688
689 /* Destroy control loops state structures */ 689 /* Destroy control loops state structures */
690 if (wf_smu_slots_fans) 690 kfree(wf_smu_slots_fans);
691 kfree(wf_smu_cpu_fans); 691 kfree(wf_smu_drive_fans);
692 if (wf_smu_drive_fans) 692 kfree(wf_smu_cpu_fans);
693 kfree(wf_smu_cpu_fans);
694 if (wf_smu_cpu_fans)
695 kfree(wf_smu_cpu_fans);
696 693
697 return 0; 694 return 0;
698} 695}