drivers/block/mtip32xx/mtip32xx.c | 2 -- 1 file changed, 2 deletions(-)
In the error exit function of the iomap_err in mtip_pci_probe,
pci_set_drvdata(pdev, NULL) and return can be removed without
affecting the code execution
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
---
drivers/block/mtip32xx/mtip32xx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 8fc7761397bd..2c33c1dfc39d 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3840,8 +3840,6 @@ static int mtip_pci_probe(struct pci_dev *pdev,
iomap_err:
kfree(dd);
- pci_set_drvdata(pdev, NULL);
- return rv;
done:
return rv;
}
--
2.47.1
On Wed, Aug 27, 2025 at 09:12:27PM +0800, Zhang Heng wrote: > In the error exit function of the iomap_err in mtip_pci_probe, > pci_set_drvdata(pdev, NULL) and return can be removed without > affecting the code execution Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> -- With Best Regards, Andy Shevchenko
On Wed, 2025-08-27 at 21:12 +0800, Zhang Heng wrote: > In the error exit function of the iomap_err in mtip_pci_probe, > pci_set_drvdata(pdev, NULL) and return can be removed without > affecting the code execution > > Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Reviewed-by: Philipp Stanner <phasta@kernel.org> > --- > drivers/block/mtip32xx/mtip32xx.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c > index 8fc7761397bd..2c33c1dfc39d 100644 > --- a/drivers/block/mtip32xx/mtip32xx.c > +++ b/drivers/block/mtip32xx/mtip32xx.c > @@ -3840,8 +3840,6 @@ static int mtip_pci_probe(struct pci_dev *pdev, > > iomap_err: > kfree(dd); > - pci_set_drvdata(pdev, NULL); > - return rv; > done: > return rv; > }
© 2016 - 2025 Red Hat, Inc.