rsi: return explicit error values
authorEnrico Weigelt <info@metux.net>
Thu, 27 Jun 2019 14:30:02 +0000 (16:30 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:42:06 +0000 (14:42 +0300)
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 <info@metux.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_sdio.c

index b42cd50b837ec0c396456989a20a3ca40977553b..2a3577d8fb612cb8b2564bc58f49c95309ca961d 100644 (file)
@@ -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;
 
@@ -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);