diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 22:50:51 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 07:50:52 -0400 |
commit | 9f3f746741d917fe3c6c544c7d319d533176d90b (patch) | |
tree | cc962947595594115c3616960c3772e4175faffb /drivers/lguest | |
parent | 24adf12722b4f2800e5b5f0955d57033f0d0c9e5 (diff) |
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>
Diffstat (limited to 'drivers/lguest')
-rw-r--r-- | drivers/lguest/lguest_user.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 4017701a1788..e73a000473cc 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, | |||
251 | if (!lg || (cpu_id >= lg->nr_cpus)) | 251 | if (!lg || (cpu_id >= lg->nr_cpus)) |
252 | return -EINVAL; | 252 | return -EINVAL; |
253 | cpu = &lg->cpus[cpu_id]; | 253 | cpu = &lg->cpus[cpu_id]; |
254 | if (!cpu) | ||
255 | return -EINVAL; | ||
256 | 254 | ||
257 | /* Once the Guest is dead, you can only read() why it died. */ | 255 | /* Once the Guest is dead, you can only read() why it died. */ |
258 | if (lg->dead) | 256 | if (lg->dead) |