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:

committed by
Greg Kroah-Hartman

parent
f862b6b24f
commit
1f7e489a28
@@ -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);
|
||||
|
Reference in New Issue
Block a user