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:
parent
24adf12722
commit
9f3f746741
1 changed files with 0 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue