提交 13f8b7c5 编写于 作者: R Roel Kluin 提交者: Martin Schwidefsky

[S390] appldata: unsigned ops->size cannot be negative

unsigned ops->size cannot be negative
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 7a4a1ccd
......@@ -424,7 +424,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
*/
int appldata_register_ops(struct appldata_ops *ops)
{
if ((ops->size > APPLDATA_MAX_REC_SIZE) || (ops->size < 0))
if (ops->size > APPLDATA_MAX_REC_SIZE)
return -EINVAL;
ops->ctl_table = kzalloc(4 * sizeof(struct ctl_table), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册