On Wed, Oct 25, 2023 at 02:39:16PM +0200, Andreas Helbech Kleist wrote: > On Tue, 2023-10-24 at 19:29 +0800, bingbu.cao@xxxxxxxxx wrote: ... > > + ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); > > + if (ret) > > + dev_err_probe(&dev->dev, ret, "Request msi failed"); > > + > > + return ret; > > +} > > pci_alloc_irq_vectors returns number of irqs, so I think it should be > something like this instead: Indeed, good catch! > ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); > if (ret<0) { > dev_err_probe(&dev->dev, ret, "Request msi failed"); > return ret; return dev_err_probe(); saves a line. > } -- With Best Regards, Andy Shevchenko