mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
net: set static variable an initial value in atl2_probe()
[ Upstream commit 4593403fa5 ]
cards_found is a static variable, but when it enters atl2_probe(),
cards_found is set to zero, the value is not consistent with last probe,
so next behavior is not our expect.
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ab7e40e70e
commit
fb7d3573ff
@@ -1334,13 +1334,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct atl2_adapter *adapter;
|
||||
static int cards_found;
|
||||
static int cards_found = 0;
|
||||
unsigned long mmio_start;
|
||||
int mmio_len;
|
||||
int err;
|
||||
|
||||
cards_found = 0;
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user