diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-05 03:13:20 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-05 03:13:20 +0400 |
commit | 17b0436077d99211d8b26886235a36c5ec54ac57 (patch) | |
tree | 8bcd9b4a0f8285f749814e95ae0365c611ba2392 /drivers/misc/ti-st/st_core.c | |
parent | aafade242ff24fac3aabf61c7861dfa44a3c2445 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) | |
download | linux-17b0436077d99211d8b26886235a36c5ec54ac57.tar.xz |
Merge commit 'v3.0' into x86/vdso
Diffstat (limited to 'drivers/misc/ti-st/st_core.c')
-rw-r--r-- | drivers/misc/ti-st/st_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index f91f82eabda7..54c91ffe4a91 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c @@ -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; } |