mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 08:04:13 +08:00
xenbus: check return value of xenbus_scanf()
Don't ignore errors here: Set backend state to unknown when unsuccessful. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
This commit is contained in:
parent
e1e5b3ff41
commit
c251f15c7d
@ -335,7 +335,9 @@ static int backend_state;
|
||||
static void xenbus_reset_backend_state_changed(struct xenbus_watch *w,
|
||||
const char **v, unsigned int l)
|
||||
{
|
||||
xenbus_scanf(XBT_NIL, v[XS_WATCH_PATH], "", "%i", &backend_state);
|
||||
if (xenbus_scanf(XBT_NIL, v[XS_WATCH_PATH], "", "%i",
|
||||
&backend_state) != 1)
|
||||
backend_state = XenbusStateUnknown;
|
||||
printk(KERN_DEBUG "XENBUS: backend %s %s\n",
|
||||
v[XS_WATCH_PATH], xenbus_strstate(backend_state));
|
||||
wake_up(&backend_state_wq);
|
||||
|
Loading…
Reference in New Issue
Block a user