提交 0b6e7220 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2a8a4b75
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册