diff --git a/sys/dev/ppbus/ppb_base.c b/sys/dev/ppbus/ppb_base.c index c2f1d9b1fd2e..060cb439c528 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); }