Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f3f7467 authored by Rusty Russell's avatar Rusty Russell
Browse files

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 24adf127
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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)