mei: call stop on failed char device register
If registering of character device failed stop the device properly. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f862b6b24f
commit
1f7e489a28
|
@ -210,7 +210,7 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
err = mei_register(dev, &pdev->dev);
|
||||
if (err)
|
||||
goto release_irq;
|
||||
goto stop;
|
||||
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
|
@ -231,6 +231,8 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
return 0;
|
||||
|
||||
stop:
|
||||
mei_stop(dev);
|
||||
release_irq:
|
||||
mei_cancel_work(dev);
|
||||
mei_disable_interrupts(dev);
|
||||
|
|
|
@ -154,7 +154,7 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
err = mei_register(dev, &pdev->dev);
|
||||
if (err)
|
||||
goto release_irq;
|
||||
goto stop;
|
||||
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
|
@ -170,6 +170,8 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
return 0;
|
||||
|
||||
stop:
|
||||
mei_stop(dev);
|
||||
release_irq:
|
||||
|
||||
mei_cancel_work(dev);
|
||||
|
|
Loading…
Reference in New Issue