提交 9f3f7467 编写于 作者: R Rusty Russell

lguest: remove bogus NULL cpu check

If lg isn't NULL, and cpu_id is sane, &lg->cpus[cpu_id] can't be NULL.
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 24adf127
......@@ -251,8 +251,6 @@ static ssize_t write(struct file *file, const char __user *in,
if (!lg || (cpu_id >= lg->nr_cpus))
return -EINVAL;
cpu = &lg->cpus[cpu_id];
if (!cpu)
return -EINVAL;
/* Once the Guest is dead, you can only read() why it died. */
if (lg->dead)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册