diff mbox series

[net-next] ionic: drop useless check of PCI driver data validity

Message ID 93b5b93f83fae371e53069fc27975e59de493a3b.1626861128.git.leonro@nvidia.com (mailing list archive)
State Accepted
Commit 524df92c1907d31bc2d2643e81c680381d7c6bf8
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ionic: drop useless check of PCI driver data validity | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit fail Errors and warnings before: 7 this patch: 7
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_allmodconfig_warn fail Errors and warnings before: 7 this patch: 7
netdev/header_inline success Link

Commit Message

Leon Romanovsky July 21, 2021, 9:54 a.m. UTC
From: Leon Romanovsky <leonro@nvidia.com>

The driver core will call to .remove callback only if .probe succeeded
and it will ensure that driver data has pointer to struct ionic.

There is no need to check it again.

Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Shannon Nelson July 21, 2021, 3:55 p.m. UTC | #1
On 7/21/21 2:54 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> The driver core will call to .remove callback only if .probe succeeded
> and it will ensure that driver data has pointer to struct ionic.
>
> There is no need to check it again.
>
> Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Thanks,

Acked-by: Shannon Nelson <snelson@pensando.io>

> ---
>   drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index e4a5416adc80..505f605fa40b 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -373,9 +373,6 @@ static void ionic_remove(struct pci_dev *pdev)
>   {
>   	struct ionic *ionic = pci_get_drvdata(pdev);
>   
> -	if (!ionic)
> -		return;
> -
>   	del_timer_sync(&ionic->watchdog_timer);
>   
>   	if (ionic->lif) {
patchwork-bot+netdevbpf@kernel.org July 21, 2021, 4:10 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 21 Jul 2021 12:54:13 +0300 you wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> The driver core will call to .remove callback only if .probe succeeded
> and it will ensure that driver data has pointer to struct ionic.
> 
> There is no need to check it again.
> 
> [...]

Here is the summary with links:
  - [net-next] ionic: drop useless check of PCI driver data validity
    https://git.kernel.org/netdev/net-next/c/524df92c1907

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index e4a5416adc80..505f605fa40b 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -373,9 +373,6 @@  static void ionic_remove(struct pci_dev *pdev)
 {
 	struct ionic *ionic = pci_get_drvdata(pdev);
 
-	if (!ionic)
-		return;
-
 	del_timer_sync(&ionic->watchdog_timer);
 
 	if (ionic->lif) {