提交 7902fe8c 编写于 作者: J Jingoo Han 提交者: Lee Jones

mfd: timberdale: Remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL. It also removes unnecessary label such
as 'err_request'.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 928dfb2c
...@@ -678,7 +678,7 @@ static int timb_probe(struct pci_dev *dev, ...@@ -678,7 +678,7 @@ static int timb_probe(struct pci_dev *dev,
priv->ctl_mapbase = mapbase + CHIPCTLOFFSET; priv->ctl_mapbase = mapbase + CHIPCTLOFFSET;
if (!request_mem_region(priv->ctl_mapbase, CHIPCTLSIZE, "timb-ctl")) { if (!request_mem_region(priv->ctl_mapbase, CHIPCTLSIZE, "timb-ctl")) {
dev_err(&dev->dev, "Failed to request ctl mem\n"); dev_err(&dev->dev, "Failed to request ctl mem\n");
goto err_request; goto err_start;
} }
priv->ctl_membase = ioremap(priv->ctl_mapbase, CHIPCTLSIZE); priv->ctl_membase = ioremap(priv->ctl_mapbase, CHIPCTLSIZE);
...@@ -828,13 +828,10 @@ static int timb_probe(struct pci_dev *dev, ...@@ -828,13 +828,10 @@ static int timb_probe(struct pci_dev *dev,
iounmap(priv->ctl_membase); iounmap(priv->ctl_membase);
err_ioremap: err_ioremap:
release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE); release_mem_region(priv->ctl_mapbase, CHIPCTLSIZE);
err_request:
pci_set_drvdata(dev, NULL);
err_start: err_start:
pci_disable_device(dev); pci_disable_device(dev);
err_enable: err_enable:
kfree(priv); kfree(priv);
pci_set_drvdata(dev, NULL);
return -ENODEV; return -ENODEV;
} }
...@@ -851,7 +848,6 @@ static void timb_remove(struct pci_dev *dev) ...@@ -851,7 +848,6 @@ static void timb_remove(struct pci_dev *dev)
pci_disable_msix(dev); pci_disable_msix(dev);
pci_disable_device(dev); pci_disable_device(dev);
pci_set_drvdata(dev, NULL);
kfree(priv); kfree(priv);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册