Skip to content

Commit

Permalink
xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
Browse files Browse the repository at this point in the history
We weren't resetting the parameter to be passed in to a
known default. Nor were we checking the return value of
hvm_get_parameter.

CC: [email protected]
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
  • Loading branch information
konradwilk committed May 24, 2012
1 parent 2e5ad6b commit a32c88b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/tty/hvc/hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ static int xen_hvm_console_init(void)
if (r < 0)
goto err;
info->evtchn = v;
hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v);
v = 0;
r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v);
if (r < 0)
goto err;
mfn = v;
Expand Down

0 comments on commit a32c88b

Please sign in to comment.