Skip to content

Commit

Permalink
rsi: return explicit error values
Browse files Browse the repository at this point in the history
Explicitly return constants instead of variable (and rely on
it to be explicitly initialized), if the value is supposed
to be fixed anyways. Align it with the rest of the driver,
which does it the same way.

Signed-off-by: Enrico Weigelt <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
metux authored and Kalle Valo committed Jul 24, 2019
1 parent 3e3bb69 commit 231e83f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/rsi/rsi_91x_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,11 +844,11 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
struct sdio_func *pfunction)
{
struct rsi_91x_sdiodev *rsi_91x_dev;
int status = -ENOMEM;
int status;

rsi_91x_dev = kzalloc(sizeof(*rsi_91x_dev), GFP_KERNEL);
if (!rsi_91x_dev)
return status;
return -ENOMEM;

adapter->rsi_dev = rsi_91x_dev;

Expand Down Expand Up @@ -890,7 +890,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
#ifdef CONFIG_RSI_DEBUGFS
adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES;
#endif
return status;
return 0;
fail:
sdio_disable_func(pfunction);
sdio_release_host(pfunction);
Expand Down

0 comments on commit 231e83f

Please sign in to comment.