summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ti-st
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-08-10 07:36:24 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-31 14:48:09 -0700
commit0b6e7220ed2be6e40bbda4eeb2b9c397008f2cef (patch)
treea5ce1f069672f26d4cca15d7c71f046606b4e5ce /drivers/staging/ti-st
parent2a8a4b75307c2ce9f893183b895b0b279621b67e (diff)
downloadblackbird-obmc-linux-0b6e7220ed2be6e40bbda4eeb2b9c397008f2cef.tar.gz
blackbird-obmc-linux-0b6e7220ed2be6e40bbda4eeb2b9c397008f2cef.zip
Staging: ti-st: writing past end of array
In the original source it would write past the end of the array before returning the error code. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ti-st')
-rw-r--r--drivers/staging/ti-st/st_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/ti-st/st_core.c b/drivers/staging/ti-st/st_core.c
index 063c9b1db1ab..0dfed21721e5 100644
--- a/drivers/staging/ti-st/st_core.c
+++ b/drivers/staging/ti-st/st_core.c
@@ -686,9 +686,8 @@ long st_register(struct st_proto_s *new_proto)
default:
pr_err("%d protocol not supported",
new_proto->type);
- err = -EPROTONOSUPPORT;
- /* something wrong */
- break;
+ spin_unlock_irqrestore(&st_gdata->lock, flags);
+ return -EPROTONOSUPPORT;
}
st_gdata->list[new_proto->type] = new_proto;
st_gdata->protos_registered++;
OpenPOWER on IntegriCloud