Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254168
b: refs/heads/master
c: 7316a9f
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent 486896b commit fce8353
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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: 5daf538a0313509ecdeb5b7a61257f39881f9361
refs/heads/master: 7316a9f2a94c14e66e9421a777dffc509a2fe0e3
2 changes: 1 addition & 1 deletion trunk/drivers/misc/ti-st/st_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ long st_unregister(struct st_proto_s *proto)
pr_debug("%s: %d ", __func__, proto->chnl_id);

st_kim_ref(&st_gdata, 0);
if (proto->chnl_id >= ST_MAX_CHANNELS) {
if (!st_gdata || proto->chnl_id >= ST_MAX_CHANNELS) {
pr_err(" chnl_id %d not supported", proto->chnl_id);
return -EPROTONOSUPPORT;
}
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/misc/ti-st/st_kim.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,10 @@ void st_kim_ref(struct st_data_s **core_data, int id)
struct kim_data_s *kim_gdata;
/* get kim_gdata reference from platform device */
pdev = st_get_plat_device(id);
if (!pdev) {
*core_data = NULL;
return;
}
kim_gdata = dev_get_drvdata(&pdev->dev);
*core_data = kim_gdata->core_data;
}
Expand Down

0 comments on commit fce8353

Please sign in to comment.