Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3548312pxj; Mon, 24 May 2021 09:07:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykZHZhVGWOPULkfr/CkVwqH8atkpB6kRChBn4WDdXixVnXrNy7ZpHtWQLOHrIcfkSxfw5a X-Received: by 2002:a05:6e02:1c8e:: with SMTP id w14mr16650310ill.138.1621872472447; Mon, 24 May 2021 09:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872472; cv=none; d=google.com; s=arc-20160816; b=K6KGovxJMP2Q578mLMFXHFPTGXlxiq9qR5QAInKwdouy7EO4OlrWLqKiTtEQlFejf8 RG8+WMPS4hKTW6iiYHoCx3Qz+U76Hdi7jkjRapdQgS2URugBUPrYzA7kdZkc9vpYe6nM eH73y1RIcl1GCDvLDl7tLvFttT/jou/7U2B3XqaC7MbuABCBrebfsIbnly0cnN8ViqHH dB1rvelb+pBSAda+Jd3Sy+mDS/PrqSigb3DONYYv9GC8Ap/YkP/U5Yzn2acIFznMDS8V Xux8KT8wzVeD4gA/Bxc5XUAkoRxFVObREkxLWJ3QKLOK6Q42Rw5wdDr6oxu5b+gHWeDE HwaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LTbV+N22ZRxUlW0TCkv3CnAdPREbiyvlfJJ8PSpwv4k=; b=xdAW0FW7ZGMnYQFFmqDaSaO/Lm/IgxP1sMIWxCWaZ9261giTUh7afc9HMQ+R9eHb65 1frUkw5lHqy3++CzRwvvvjX0cJKabinMa7UCM26e8Akrzh4Ryo9rvncydoBJU5EsiE2c VL9qww72cx777njQrik0HIvLElbE8WTbuwakMPCIy3YlBSPTOcz4YFOL5ZulR86ovqjc doy+SU6JgKAfDMNVZBPoAc6xxdHXbTvvrQ8q6XhN23vDXYVHqXVm2GwWH1+k686C2oz9 ER+e3gly0iIVOvetUH9yBZlkOsqQzYwLXAqaVKZ0ID8HYjm1D2iQvdAvwauay9Iz9Ht2 3b9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xP5dztCH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 125si14432903iou.87.2021.05.24.09.07.39; Mon, 24 May 2021 09:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xP5dztCH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237617AbhEXQIb (ORCPT + 99 others); Mon, 24 May 2021 12:08:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:41102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234833AbhEXQA0 (ORCPT ); Mon, 24 May 2021 12:00:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D9C066146D; Mon, 24 May 2021 15:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871168; bh=XCt114qiNhLnTdPz6qVXnm6+12wngqJVV6L5zOEzmO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xP5dztCHvk3pIrIsE5nRy5HOROaJ3reNy8dqfqxKKnrL9oEvMRcatfKgxQgFCBZON BnLSEsvBf/WKQmyk4tddcq1AwCThqsNmEI1OMecLPFaxokwev4fUbTFGVKeUKGSz/E us6nLWHjNY+YNsJ9aX5D+oTRwV813OMa04ikuU1M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Michael S. Tsirkin" , =?UTF-8?q?Martin=20=C3=85gren?= Subject: [PATCH 5.12 060/127] uio/uio_pci_generic: fix return value changed in refactoring Date: Mon, 24 May 2021 17:26:17 +0200 Message-Id: <20210524152336.865935428@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Ågren commit 156ed0215ef365604f2382d5164c36d3a1cfd98f upstream. 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 Acked-by: Michael S. Tsirkin Signed-off-by: Martin Ågren Link: https://lore.kernel.org/r/20210422192240.1136373-1-martin.agren@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/uio/uio_pci_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/uio/uio_pci_generic.c +++ b/drivers/uio/uio_pci_generic.c @@ -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)