|
@@ -772,8 +772,10 @@ static int skeleton_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
|
|
|
|
|
/* Allocate a new instance */
|
|
/* Allocate a new instance */
|
|
|
skel = devm_kzalloc(&pdev->dev, sizeof(struct skeleton), GFP_KERNEL);
|
|
skel = devm_kzalloc(&pdev->dev, sizeof(struct skeleton), GFP_KERNEL);
|
|
|
- if (!skel)
|
|
|
|
|
- return -ENOMEM;
|
|
|
|
|
|
|
+ if (!skel) {
|
|
|
|
|
+ ret = -ENOMEM;
|
|
|
|
|
+ goto disable_pci;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/* Allocate the interrupt */
|
|
/* Allocate the interrupt */
|
|
|
ret = devm_request_irq(&pdev->dev, pdev->irq,
|
|
ret = devm_request_irq(&pdev->dev, pdev->irq,
|