projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24adf12
)
lguest: remove bogus NULL cpu check
author
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 3 May 2008 02:50:51 +0000
(21:50 -0500)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 2 May 2008 11:50:52 +0000
(21:50 +1000)
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>
drivers/lguest/lguest_user.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/lguest/lguest_user.c
b/drivers/lguest/lguest_user.c
index 4017701a178877da0f4258cc92f442ce4b1ec1de..e73a000473cc524cd16d9773da390047d362751e 100644
(file)
--- 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)