Skip to content

Commit

Permalink
lguest: remove bogus NULL cpu check
Browse files Browse the repository at this point in the history
If lg isn't NULL, and cpu_id is sane, &lg->cpus[cpu_id] can't be NULL.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed May 2, 2008
1 parent 24adf12 commit 9f3f746
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/lguest/lguest_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9f3f746

Please sign in to comment.