aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ppbus/ppb_base.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ppbus/ppb_base.c b/sys/dev/ppbus/ppb_base.c
index c2f1d9b1fd2ed..060cb439c5282 100644
--- a/sys/dev/ppbus/ppb_base.c
+++ b/sys/dev/ppbus/ppb_base.c
@@ -131,10 +131,11 @@ ppb_set_mode(device_t bus, int mode)
struct ppb_data *ppb = DEVTOSOFTC(bus);
int old_mode = ppb_get_mode(bus);
- if (!PPBUS_SETMODE(device_get_parent(bus), mode)) {
- /* XXX yet device mode = ppbus mode = chipset mode */
- ppb->mode = (mode & PPB_MASK);
- }
+ if (PPBUS_SETMODE(device_get_parent(bus), mode))
+ return -1;
+
+ /* XXX yet device mode = ppbus mode = chipset mode */
+ ppb->mode = (mode & PPB_MASK);
return (old_mode);
}