Re: [PATCH hyperv-next v5 08/11] Drivers: hv: vmbus: Get the IRQ number from DeviceTree

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

 





On 3/13/2025 11:44 AM, Rob Herring wrote:
On Fri, Mar 7, 2025 at 4:03 PM Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx> wrote:

[...]

+       irq = platform_get_irq(pdev, 0);
+       if (irq == 0) {
+               pr_err("VMBus interrupt mapping failure\n");
+               return -EINVAL;
+       }
+       if (irq < 0) {
+               pr_err("VMBus interrupt data can't be read from DeviceTree, error %d\n", irq);
+               return irq;
+       }

I don't think why you couldn't get the interrupt is important. Just
check for (irq <= 0) and be done with it. I'm not even sure if
returning 0 is possible now. There's a long history to that and
NO_IRQ.


That will certainly make the code look much better!
Thank you very much for the idea!

Rob

--
Thank you,
Roman





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux