linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] block: mtip32xx: Remove excess code in mtip_pci_probe
@ 2025-08-27 13:12 Zhang Heng
  2025-08-27 13:50 ` Philipp Stanner
  2025-09-01  6:05 ` Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Zhang Heng @ 2025-08-27 13:12 UTC (permalink / raw)
  To: axboe, phasta, andriy.shevchenko, broonie, lizetao1, viro,
	fourier.thomas, anuj20.g
  Cc: linux-block, linux-kernel, Zhang Heng

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] block: mtip32xx: Remove excess code in mtip_pci_probe
  2025-08-27 13:12 [PATCH v3] block: mtip32xx: Remove excess code in mtip_pci_probe Zhang Heng
@ 2025-08-27 13:50 ` Philipp Stanner
  2025-09-01  6:05 ` Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Stanner @ 2025-08-27 13:50 UTC (permalink / raw)
  To: Zhang Heng, axboe, phasta, andriy.shevchenko, broonie, lizetao1,
	viro, fourier.thomas, anuj20.g
  Cc: linux-block, linux-kernel

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;
>  }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] block: mtip32xx: Remove excess code in mtip_pci_probe
  2025-08-27 13:12 [PATCH v3] block: mtip32xx: Remove excess code in mtip_pci_probe Zhang Heng
  2025-08-27 13:50 ` Philipp Stanner
@ 2025-09-01  6:05 ` Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-09-01  6:05 UTC (permalink / raw)
  To: Zhang Heng
  Cc: axboe, phasta, broonie, lizetao1, viro, fourier.thomas, anuj20.g,
	linux-block, linux-kernel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-01  6:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 13:12 [PATCH v3] block: mtip32xx: Remove excess code in mtip_pci_probe Zhang Heng
2025-08-27 13:50 ` Philipp Stanner
2025-09-01  6:05 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).