Skip to content

Commit

Permalink
wifi: wilc1000: Fill in missing error handling
Browse files Browse the repository at this point in the history
Add error handling to chip_wakeup() and propagate the errors throughout
the entire driver. Add error handling to acquire_bus()/release_bus() and
host_sleep_notify()/host_wakeup_notify() functions as a result as well.
Fill the error handling to all call sites.

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-4-marex@denx.de
  • Loading branch information
Marek Vasut authored and Kalle Valo committed Oct 17, 2024
1 parent 0a6ea2e commit 1241c56
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 51 deletions.
11 changes: 7 additions & 4 deletions drivers/net/wireless/microchip/wilc1000/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ static int wilc_sdio_suspend(struct device *dev)
{
struct sdio_func *func = dev_to_sdio_func(dev);
struct wilc *wilc = sdio_get_drvdata(func);
int ret;

dev_info(dev, "sdio suspend\n");

Expand All @@ -969,7 +970,11 @@ static int wilc_sdio_suspend(struct device *dev)
if (!IS_ERR(wilc->rtc_clk))
clk_disable_unprepare(wilc->rtc_clk);

host_sleep_notify(wilc);
ret = host_sleep_notify(wilc);
if (ret) {
clk_prepare_enable(wilc->rtc_clk);
return ret;
}

wilc_sdio_disable_interrupt(wilc);

Expand All @@ -992,9 +997,7 @@ static int wilc_sdio_resume(struct device *dev)
wilc_sdio_init(wilc, true);
wilc_sdio_enable_interrupt(wilc);

host_wakeup_notify(wilc);

return 0;
return host_wakeup_notify(wilc);
}

static const struct of_device_id wilc_of_match[] = {
Expand Down
Loading

0 comments on commit 1241c56

Please sign in to comment.