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: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2008-05-02 21:50:51 -05:00
parent 24adf12722
commit 9f3f746741

View File

@ -251,8 +251,6 @@ static ssize_t write(struct file *file, const char __user *in,
if (!lg || (cpu_id >= lg->nr_cpus)) if (!lg || (cpu_id >= lg->nr_cpus))
return -EINVAL; return -EINVAL;
cpu = &lg->cpus[cpu_id]; cpu = &lg->cpus[cpu_id];
if (!cpu)
return -EINVAL;
/* Once the Guest is dead, you can only read() why it died. */ /* Once the Guest is dead, you can only read() why it died. */
if (lg->dead) if (lg->dead)