]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
uio/uio_pci_generic: fix return value changed in refactoring
authorMartin Ågren <martin.agren@gmail.com>
Thu, 22 Apr 2021 19:22:40 +0000 (21:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 11:25:27 +0000 (13:25 +0200)
Commit ef84928cff58 ("uio/uio_pci_generic: use device-managed function
equivalents") was able to simplify various error paths thanks to no
longer having to clean up on the way out. Some error paths were dropped,
others were simplified. In one of those simplifications, the return
value was accidentally changed from -ENODEV to -ENOMEM. Restore the old
return value.

Fixes: ef84928cff58 ("uio/uio_pci_generic: use device-managed function equivalents")
Cc: stable <stable@vger.kernel.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Link: https://lore.kernel.org/r/20210422192240.1136373-1-martin.agren@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_pci_generic.c

index c7d681fef198d6735dcbe0d2afcdaaed611a4b99..3bb0b0075467931c3b4d2e56fd915a1d56cf7efc 100644 (file)
@@ -82,7 +82,7 @@ static int probe(struct pci_dev *pdev,
        }
 
        if (pdev->irq && !pci_intx_mask_supported(pdev))
-               return -ENOMEM;
+               return -ENODEV;
 
        gdev = devm_kzalloc(&pdev->dev, sizeof(struct uio_pci_generic_dev), GFP_KERNEL);
        if (!gdev)