From: Rusty Russell Date: Sat, 3 May 2008 02:50:51 +0000 (-0500) Subject: lguest: remove bogus NULL cpu check X-Git-Tag: v2.6.26-rc1~15^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f3f746741d917fe3c6c544c7d319d533176d90b;p=linux-2.6 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 --- diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 4017701a17..e73a000473 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c @@ -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)