diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-04-19 07:08:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-23 14:33:24 +0200 |
commit | 2c3f894567c6556772048b54d306b48c2d87b4a6 (patch) | |
tree | c256dfdce9fcaf0fe254a69e55e615b60a57ee36 /drivers/staging | |
parent | 5e8779dcdcc51fda2437f39deef26b6b6af5058a (diff) |
staging: ks7010: init local variables when they are declared in ks7010_sdio_probe
This commit change init point of two variables to forward them to
init time. This variables are just being assigned some lines after
and it is more clear to init them when the init value is known and
in this case this is known when they are declared.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/ks7010/ks7010_sdio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 164d44a5f36c..c1bd7de4007f 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -914,14 +914,11 @@ static void ks7010_private_init(struct ks_wlan_private *priv, static int ks7010_sdio_probe(struct sdio_func *func, const struct sdio_device_id *device) { - struct ks_wlan_private *priv; + struct ks_wlan_private *priv = NULL; + struct net_device *netdev = NULL; struct ks_sdio_card *card; - struct net_device *netdev; int ret; - priv = NULL; - netdev = NULL; - card = kzalloc(sizeof(*card), GFP_KERNEL); if (!card) return -ENOMEM; |