提交 2c3f8945 编写于 作者: S Sergio Paracuellos 提交者: Greg Kroah-Hartman

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: NSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5e8779dc
...@@ -914,14 +914,11 @@ static void ks7010_private_init(struct ks_wlan_private *priv, ...@@ -914,14 +914,11 @@ static void ks7010_private_init(struct ks_wlan_private *priv,
static int ks7010_sdio_probe(struct sdio_func *func, static int ks7010_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *device) 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 ks_sdio_card *card;
struct net_device *netdev;
int ret; int ret;
priv = NULL;
netdev = NULL;
card = kzalloc(sizeof(*card), GFP_KERNEL); card = kzalloc(sizeof(*card), GFP_KERNEL);
if (!card) if (!card)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册