mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-15 18:04:36 +00:00
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
@ -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…
x
Reference in New Issue
Block a user