drivers/atm: Import OnePlus Changes

Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
This commit is contained in:
Cyber Knight 2021-09-26 00:39:59 +08:00
parent d1502b63c5
commit b253542d05
No known key found for this signature in database
GPG Key ID: 23BD4CCD326E9D64
3 changed files with 3 additions and 10 deletions

View File

@ -432,15 +432,9 @@ static int atmtcp_remove_persistent(int itf)
return -EMEDIUMTYPE;
}
dev_data = PRIV(dev);
if (!dev_data->persist) {
atm_dev_put(dev);
return 0;
}
if (!dev_data->persist) return 0;
dev_data->persist = 0;
if (PRIV(dev)->vcc) {
atm_dev_put(dev);
return 0;
}
if (PRIV(dev)->vcc) return 0;
kfree(dev_data);
atm_dev_put(dev);
atm_dev_deregister(dev);

View File

@ -2243,7 +2243,7 @@ static int eni_init_one(struct pci_dev *pci_dev,
rc = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
if (rc < 0)
goto err_disable;
goto out;
rc = -ENOMEM;
eni_dev = kmalloc(sizeof(struct eni_dev), GFP_KERNEL);

View File

@ -1013,7 +1013,6 @@ static int fs_open(struct atm_vcc *atm_vcc)
error = make_rate (pcr, r, &tmc0, NULL);
if (error) {
kfree(tc);
kfree(vcc);
return error;
}
}