Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325503
b: refs/heads/master
c: f2f13a6
h: refs/heads/master
i:
  325501: 71aa799
  325499: f351bca
  325495: f06d4bb
  325487: 4f49860
  325471: ae67860
  325439: 60d2a53
  325375: eaca102
v: v3
  • Loading branch information
Axel Lin authored and Jonathan Cameron committed Sep 22, 2012
1 parent 33a07e4 commit 7aa9e09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f257caf2d18fb45ab8d0fbaf71812d2b403cd0d
refs/heads/master: f2f13a68c37c13a7147b279b77b8fb2a36846059
12 changes: 4 additions & 8 deletions trunk/drivers/hid/hid-sensor-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ static int sensor_hub_probe(struct hid_device *hdev,
sizeof(struct mfd_cell),
GFP_KERNEL);
if (sd->hid_sensor_hub_client_devs == NULL) {
hid_err(hdev,
"Failed to allocate memory for mfd cells\n");
hid_err(hdev, "Failed to allocate memory for mfd cells\n");
ret = -ENOMEM;
goto err_close;
}
Expand All @@ -568,10 +567,9 @@ static int sensor_hub_probe(struct hid_device *hdev,
name = kasprintf(GFP_KERNEL, "HID-SENSOR-%x",
field->physical);
if (name == NULL) {
hid_err(hdev,
"Failed MFD device name\n");
hid_err(hdev, "Failed MFD device name\n");
ret = -ENOMEM;
goto err_free_cells;
goto err_free_names;
}
sd->hid_sensor_hub_client_devs[
sd->hid_sensor_client_cnt].name = name;
Expand All @@ -595,10 +593,8 @@ static int sensor_hub_probe(struct hid_device *hdev,
err_free_names:
for (i = 0; i < sd->hid_sensor_client_cnt ; ++i)
kfree(sd->hid_sensor_hub_client_devs[i].name);
err_free_cells:
kfree(sd->hid_sensor_hub_client_devs);
err_close:
hid_hw_stop(hdev);
hid_hw_close(hdev);
err_stop_hw:
hid_hw_stop(hdev);
Expand All @@ -617,8 +613,8 @@ static void sensor_hub_remove(struct hid_device *hdev)
int i;

hid_dbg(hdev, " hardware removed\n");
hid_hw_stop(hdev);
hid_hw_close(hdev);
hid_hw_stop(hdev);
spin_lock_irqsave(&data->lock, flags);
if (data->pending.status)
complete(&data->pending.ready);
Expand Down

0 comments on commit 7aa9e09

Please sign in to comment.