bool fixed);
        void (*reset)(struct wl1271 *wl);
        void (*init)(struct wl1271 *wl);
-       void (*power)(struct wl1271 *wl, bool enable);
+       int (*power)(struct wl1271 *wl, bool enable);
        struct device* (*dev)(struct wl1271 *wl);
        void (*enable_irq)(struct wl1271 *wl);
        void (*disable_irq)(struct wl1271 *wl);
 
        clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
 }
 
-static inline void wl1271_power_on(struct wl1271 *wl)
+static inline int wl1271_power_on(struct wl1271 *wl)
 {
-       wl->if_ops->power(wl, true);
-       set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
+       int ret = wl->if_ops->power(wl, true);
+       if (ret == 0)
+               set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
+
+       return ret;
 }
 
 
 
        int ret = 0;
 
        msleep(WL1271_PRE_POWER_ON_SLEEP);
-       wl1271_power_on(wl);
+       ret = wl1271_power_on(wl);
+       if (ret < 0)
+               goto out;
        msleep(WL1271_POWER_ON_SLEEP);
        wl1271_io_reset(wl);
        wl1271_io_init(wl);
 
                wl1271_error("sdio write failed (%d)", ret);
 }
 
-static void wl1271_sdio_power_on(struct wl1271 *wl)
+static int wl1271_sdio_power_on(struct wl1271 *wl)
 {
        struct sdio_func *func = wl_to_func(wl);
 
        sdio_claim_host(func);
        sdio_enable_func(func);
        sdio_release_host(func);
+
+       return 0;
 }
 
-static void wl1271_sdio_power_off(struct wl1271 *wl)
+static int wl1271_sdio_power_off(struct wl1271 *wl)
 {
        struct sdio_func *func = wl_to_func(wl);
 
        sdio_claim_host(func);
        sdio_disable_func(func);
        sdio_release_host(func);
+
+       return 0;
 }
 
-static void wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
+static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
 {
        /* Let the SDIO stack handle wlan_enable control, so we
         * keep host claimed while wlan is in use to keep wl1271
         * alive.
         */
        if (enable)
-               wl1271_sdio_power_on(wl);
+               return wl1271_sdio_power_on(wl);
        else
-               wl1271_sdio_power_off(wl);
-
+               return wl1271_sdio_power_off(wl);
 }
 
 static struct wl1271_if_operations sdio_ops = {
 
        return IRQ_HANDLED;
 }
 
-static void wl1271_spi_set_power(struct wl1271 *wl, bool enable)
+static int wl1271_spi_set_power(struct wl1271 *wl, bool enable)
 {
        if (wl->set_power)
                wl->set_power(enable);
+
+       return 0;
 }
 
 static struct wl1271_if_operations spi_ops = {