summaryrefslogtreecommitdiff
path: root/drivers/xen/pvblock.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-24 20:24:21 -0400
committerTom Rini <trini@konsulko.com>2020-08-25 08:12:05 -0400
commit8ee3a24fdc237c76cead618a173740594287dd96 (patch)
treea19a58ee49166c02dce5bdb35262bb48c2078e8c /drivers/xen/pvblock.c
parent3c0cec035e5b06b638fb52ccd7383bbd5bcede35 (diff)
parent3337b291442e31b1db0ff5975f74fec7d9741794 (diff)
Merge branch '2020-08-24-misc-improvements'
- Squashfs compression support - Coverity fixes - XEN guest updates - Finish previous MediaTek updates - Arm Total Compute platform support
Diffstat (limited to 'drivers/xen/pvblock.c')
-rw-r--r--drivers/xen/pvblock.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c
index 76e82fbf41..1b3325bbe2 100644
--- a/drivers/xen/pvblock.c
+++ b/drivers/xen/pvblock.c
@@ -294,8 +294,8 @@ static void shutdown_blkfront(struct blkfront_dev *dev)
snprintf(path, sizeof(path), "%s/state", dev->backend);
snprintf(nodename, sizeof(nodename), "%s/state", dev->nodename);
- if ((err = xenbus_switch_state(XBT_NIL, nodename,
- XenbusStateClosing)) != NULL) {
+ err = xenbus_switch_state(XBT_NIL, nodename, XenbusStateClosing);
+ if (err) {
printf("%s: error changing state to %d: %s\n", __func__,
XenbusStateClosing, err);
goto close;
@@ -306,8 +306,8 @@ static void shutdown_blkfront(struct blkfront_dev *dev)
err = xenbus_wait_for_state_change(path, &state);
free(err);
- if ((err = xenbus_switch_state(XBT_NIL, nodename,
- XenbusStateClosed)) != NULL) {
+ err = xenbus_switch_state(XBT_NIL, nodename, XenbusStateClosed);
+ if (err) {
printf("%s: error changing state to %d: %s\n", __func__,
XenbusStateClosed, err);
goto close;
@@ -319,8 +319,8 @@ static void shutdown_blkfront(struct blkfront_dev *dev)
free(err);
}
- if ((err = xenbus_switch_state(XBT_NIL, nodename,
- XenbusStateInitialising)) != NULL) {
+ err = xenbus_switch_state(XBT_NIL, nodename, XenbusStateInitialising);
+ if (err) {
printf("%s: error changing state to %d: %s\n", __func__,
XenbusStateInitialising, err);
goto close;