All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:14 ` Pavel Skripkin
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2021-06-23 19:14 UTC (permalink / raw)
  To: kvalo, davem, chunkeey
  Cc: ath10k, linux-wireless, netdev, linux-kernel,
	linux-kernel-mentees, Pavel Skripkin

In case of not supported chip the code jump
to the error handling path, but _ret_ will be set to 0.
Returning 0 from probe means, that ->probe() succeeded, but
it's not true when chip is not supported.

Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
 drivers/net/wireless/ath/ath10k/pci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e7fde635e0ee..36ea8debd1c7 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3697,11 +3697,15 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
 	}
 
 	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
-	if (bus_params.chip_id == 0xffffffff)
+	if (bus_params.chip_id == 0xffffffff) {
+		ret = -ENODEV;
 		goto err_unsupported;
+	}
 
-	if (!ath10k_pci_chip_is_supported(pdev->device, bus_params.chip_id))
+	if (!ath10k_pci_chip_is_supported(pdev->device, bus_params.chip_id)) {
+		ret = -ENODEV;
 		goto err_free_irq;
+	}
 
 	ret = ath10k_core_register(ar, &bus_params);
 	if (ret) {
-- 
2.32.0


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

* [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:14 ` Pavel Skripkin
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2021-06-23 19:14 UTC (permalink / raw)
  To: kvalo, davem, chunkeey
  Cc: netdev, linux-wireless, linux-kernel, ath10k, linux-kernel-mentees

In case of not supported chip the code jump
to the error handling path, but _ret_ will be set to 0.
Returning 0 from probe means, that ->probe() succeeded, but
it's not true when chip is not supported.

Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
 drivers/net/wireless/ath/ath10k/pci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e7fde635e0ee..36ea8debd1c7 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3697,11 +3697,15 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
 	}
 
 	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
-	if (bus_params.chip_id == 0xffffffff)
+	if (bus_params.chip_id == 0xffffffff) {
+		ret = -ENODEV;
 		goto err_unsupported;
+	}
 
-	if (!ath10k_pci_chip_is_supported(pdev->device, bus_params.chip_id))
+	if (!ath10k_pci_chip_is_supported(pdev->device, bus_params.chip_id)) {
+		ret = -ENODEV;
 		goto err_free_irq;
+	}
 
 	ret = ath10k_core_register(ar, &bus_params);
 	if (ret) {
-- 
2.32.0

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:14 ` Pavel Skripkin
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2021-06-23 19:14 UTC (permalink / raw)
  To: kvalo, davem, chunkeey
  Cc: ath10k, linux-wireless, netdev, linux-kernel,
	linux-kernel-mentees, Pavel Skripkin

In case of not supported chip the code jump
to the error handling path, but _ret_ will be set to 0.
Returning 0 from probe means, that ->probe() succeeded, but
it's not true when chip is not supported.

Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
 drivers/net/wireless/ath/ath10k/pci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e7fde635e0ee..36ea8debd1c7 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3697,11 +3697,15 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
 	}
 
 	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
-	if (bus_params.chip_id == 0xffffffff)
+	if (bus_params.chip_id == 0xffffffff) {
+		ret = -ENODEV;
 		goto err_unsupported;
+	}
 
-	if (!ath10k_pci_chip_is_supported(pdev->device, bus_params.chip_id))
+	if (!ath10k_pci_chip_is_supported(pdev->device, bus_params.chip_id)) {
+		ret = -ENODEV;
 		goto err_free_irq;
+	}
 
 	ret = ath10k_core_register(ar, &bus_params);
 	if (ret) {
-- 
2.32.0


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] net: ath10: add missing ret initialization
  2021-06-23 19:14 ` Pavel Skripkin
  (?)
@ 2021-06-23 19:23   ` Christian Lamparter
  -1 siblings, 0 replies; 9+ messages in thread
From: Christian Lamparter @ 2021-06-23 19:23 UTC (permalink / raw)
  To: Pavel Skripkin, kvalo, davem, Yang Yingliang
  Cc: ath10k, linux-wireless, netdev, linux-kernel, linux-kernel-mentees

On 23/06/2021 21:14, Pavel Skripkin wrote:
> In case of not supported chip the code jump
> to the error handling path, but _ret_ will be set to 0.
> Returning 0 from probe means, that ->probe() succeeded, but
> it's not true when chip is not supported.
> 
> Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>

I think this is already fixed by:

commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3
Author: Yang Yingliang <yangyingliang@huawei.com>
Date:   Mon May 31 17:41:28 2021 +0300

     ath10k: add missing error return code in ath10k_pci_probe()


Cheers
Christian

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

* Re: [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:23   ` Christian Lamparter
  0 siblings, 0 replies; 9+ messages in thread
From: Christian Lamparter @ 2021-06-23 19:23 UTC (permalink / raw)
  To: Pavel Skripkin, kvalo, davem, Yang Yingliang
  Cc: netdev, linux-wireless, linux-kernel, ath10k, linux-kernel-mentees

On 23/06/2021 21:14, Pavel Skripkin wrote:
> In case of not supported chip the code jump
> to the error handling path, but _ret_ will be set to 0.
> Returning 0 from probe means, that ->probe() succeeded, but
> it's not true when chip is not supported.
> 
> Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>

I think this is already fixed by:

commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3
Author: Yang Yingliang <yangyingliang@huawei.com>
Date:   Mon May 31 17:41:28 2021 +0300

     ath10k: add missing error return code in ath10k_pci_probe()


Cheers
Christian
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:23   ` Christian Lamparter
  0 siblings, 0 replies; 9+ messages in thread
From: Christian Lamparter @ 2021-06-23 19:23 UTC (permalink / raw)
  To: Pavel Skripkin, kvalo, davem, Yang Yingliang
  Cc: ath10k, linux-wireless, netdev, linux-kernel, linux-kernel-mentees

On 23/06/2021 21:14, Pavel Skripkin wrote:
> In case of not supported chip the code jump
> to the error handling path, but _ret_ will be set to 0.
> Returning 0 from probe means, that ->probe() succeeded, but
> it's not true when chip is not supported.
> 
> Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>

I think this is already fixed by:

commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3
Author: Yang Yingliang <yangyingliang@huawei.com>
Date:   Mon May 31 17:41:28 2021 +0300

     ath10k: add missing error return code in ath10k_pci_probe()


Cheers
Christian

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] net: ath10: add missing ret initialization
  2021-06-23 19:23   ` Christian Lamparter
  (?)
@ 2021-06-23 19:26     ` Pavel Skripkin
  -1 siblings, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2021-06-23 19:26 UTC (permalink / raw)
  To: Christian Lamparter
  Cc: kvalo, davem, Yang Yingliang, ath10k, linux-wireless, netdev,
	linux-kernel, linux-kernel-mentees

On Wed, 23 Jun 2021 21:23:27 +0200
Christian Lamparter <chunkeey@gmail.com> wrote:

> On 23/06/2021 21:14, Pavel Skripkin wrote:
> > In case of not supported chip the code jump
> > to the error handling path, but _ret_ will be set to 0.
> > Returning 0 from probe means, that ->probe() succeeded, but
> > it's not true when chip is not supported.
> > 
> > Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
> > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> 
> I think this is already fixed by:
> 
> commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3
> Author: Yang Yingliang <yangyingliang@huawei.com>
> Date:   Mon May 31 17:41:28 2021 +0300
> 
>      ath10k: add missing error return code in ath10k_pci_probe()
> 
> 

Ah, i didn't check linux-next tree, my bad :(

Thanks for pointing it out



With regards,
Pavel Skripkin

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

* Re: [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:26     ` Pavel Skripkin
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2021-06-23 19:26 UTC (permalink / raw)
  To: Christian Lamparter
  Cc: netdev, linux-wireless, linux-kernel, ath10k, Yang Yingliang,
	linux-kernel-mentees, davem, kvalo

On Wed, 23 Jun 2021 21:23:27 +0200
Christian Lamparter <chunkeey@gmail.com> wrote:

> On 23/06/2021 21:14, Pavel Skripkin wrote:
> > In case of not supported chip the code jump
> > to the error handling path, but _ret_ will be set to 0.
> > Returning 0 from probe means, that ->probe() succeeded, but
> > it's not true when chip is not supported.
> > 
> > Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
> > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> 
> I think this is already fixed by:
> 
> commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3
> Author: Yang Yingliang <yangyingliang@huawei.com>
> Date:   Mon May 31 17:41:28 2021 +0300
> 
>      ath10k: add missing error return code in ath10k_pci_probe()
> 
> 

Ah, i didn't check linux-next tree, my bad :(

Thanks for pointing it out



With regards,
Pavel Skripkin
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [PATCH] net: ath10: add missing ret initialization
@ 2021-06-23 19:26     ` Pavel Skripkin
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2021-06-23 19:26 UTC (permalink / raw)
  To: Christian Lamparter
  Cc: kvalo, davem, Yang Yingliang, ath10k, linux-wireless, netdev,
	linux-kernel, linux-kernel-mentees

On Wed, 23 Jun 2021 21:23:27 +0200
Christian Lamparter <chunkeey@gmail.com> wrote:

> On 23/06/2021 21:14, Pavel Skripkin wrote:
> > In case of not supported chip the code jump
> > to the error handling path, but _ret_ will be set to 0.
> > Returning 0 from probe means, that ->probe() succeeded, but
> > it's not true when chip is not supported.
> > 
> > Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection")
> > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> 
> I think this is already fixed by:
> 
> commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3
> Author: Yang Yingliang <yangyingliang@huawei.com>
> Date:   Mon May 31 17:41:28 2021 +0300
> 
>      ath10k: add missing error return code in ath10k_pci_probe()
> 
> 

Ah, i didn't check linux-next tree, my bad :(

Thanks for pointing it out



With regards,
Pavel Skripkin

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2021-06-23 19:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 19:14 [PATCH] net: ath10: add missing ret initialization Pavel Skripkin
2021-06-23 19:14 ` Pavel Skripkin
2021-06-23 19:14 ` Pavel Skripkin
2021-06-23 19:23 ` Christian Lamparter
2021-06-23 19:23   ` Christian Lamparter
2021-06-23 19:23   ` Christian Lamparter
2021-06-23 19:26   ` Pavel Skripkin
2021-06-23 19:26     ` Pavel Skripkin
2021-06-23 19:26     ` Pavel Skripkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.