Search Linux Wireless

Re: [RFC net-next/wireless-next v1 2/2] ath10k: move device_get_mac_address() and pass errors up the chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mathias,

On 02/11/2021 23:08, Mathias Kresin wrote:
10/30/21 7:41 PM, Christian Lamparter:
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -745,9 +745,11 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
      size = sizeof(*ar_pci) + sizeof(*ar_ahb);
      ar = ath10k_core_create(size, &pdev->dev, ATH10K_BUS_AHB,
                  hw_rev, &ath10k_ahb_hif_ops);
-    if (!ar) {
-        dev_err(&pdev->dev, "failed to allocate core\n");
-        return -ENOMEM;
+    if (IS_ERR(ar)) {
+        ret = PTR_ERR(ar);
+        if (ret != -EPROBE_DEFER)
+            dev_err(&pdev->dev, "failed to allocate core: %d\n", ret);

There's a helper for that: dev_err_probe().

I was looking for that. Thank you! :-)
(I need to check if this device_get_mac_address() all works
with 5.15-next or not. It's probably easier to wait until
5.16-rc1-wt gets released).

Regards,
Christian



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux