From patchwork Mon Sep 13 13:11:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 509760 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp607737jao; Mon, 13 Sep 2021 07:24:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVni7cTUvjbmSWUcx9t2Qr94AVGhL4vGnrwXKjuTEkrAWbSHLmUQI2HzZicjquraHyNvuN X-Received: by 2002:a50:cc48:: with SMTP id n8mr6556425edi.304.1631543068820; Mon, 13 Sep 2021 07:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631543068; cv=none; d=google.com; s=arc-20160816; b=DFqUptVwsutxkfZCYGjhppTNfQoffiGJEjSRuciyOo7Ac0DtyaFmph33mcf5AZg3D0 dJWXNU6Y2KQmJnOo39zte9JTA2JLw8nQr4Kk2IYLxkMsNe0pQviMLL3AGSEf6pPW2RrB pPOs93R79C7sZpqDYHQY9WwJy4sAmYaIpA7BL7a8VkNrdnSi0EYGfWPUpGf6DwSWRXgs HCt8BAQw7tLUuKB/tt57y4Hamt+iuVcHOb6n34DrVOT/Es/yUdiyEp+1VJlfFNci41WN 2x5dDO+I9PpOF0lYx0UCjjxXc5s8jycn3en88eV6msGcPhltiuD21cTo0qI8j0o4gwxN wD1w== 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=mNv0cY38+yyztZgwLnOtmdwOh06m1sjZdTxaB03QqQE=; b=UJoezH+/+jhAx96N20u5dwnJ06GkA3WtKZQrm3Sg6EmTz74YP+Ap3nW23GHcVtMhPt 5iKjfZdBx7bYmg8k/xULIgzu61yadwG8rnixlREiKYttBEpkwXD+ULfsIL8mkcw7BnD4 dOKolznJVhyoRlBNKb9Lo9nQ9C7EOoJJ14egTvFfyMhDa4WstDxZuOUIijhbpfi40lhw lvw1BYxF7L4DFxcPs+I00Ago3R/gdzoVos/5RtB8TZi31Z8n4H7doowgHb9u/kUOe196 LEXKpIC26Sl6xWRqqt1PRepr9LD0BX2C/pC8sDY/kIRRv/Ova8gq3hTB2FEuy9gHWOm3 4bZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Th23PvSb; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 u2si9381639ejy.557.2021.09.13.07.24.28; Mon, 13 Sep 2021 07:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=Th23PvSb; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1345020AbhIMOZm (ORCPT + 11 others); Mon, 13 Sep 2021 10:25:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:45636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345712AbhIMOW5 (ORCPT ); Mon, 13 Sep 2021 10:22:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 839E761A8F; Mon, 13 Sep 2021 13:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540871; bh=AO33QXA2qI7bkkbxNCXmBfdIcH625xh+knSBmMfrrJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Th23PvSb+6Ht7EfYhcD207Azxcai9VpNkl7srGZmRVpP7vrUiUXtiC+I1UIYOrDfk SCimZZ51qjIMAtYImDvjQizPN5iPR/yVl7gGW0j1PFNywUkPp+yb8xeagwRnihgeuy Jy963ualIwur77ENh0Df6gCx8U7hxMlnGKOSh1IE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Thomas Gleixner , Sasha Levin Subject: [PATCH 5.14 061/334] genirq/timings: Fix error return code in irq_timings_test_irqs() Date: Mon, 13 Sep 2021 15:11:55 +0200 Message-Id: <20210913131115.478595839@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 290fdc4b7ef14e33d0e30058042b0e9bfd02b89b ] Return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f52da98d900e ("genirq/timings: Add selftest for irqs circular buffer") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210811093333.2376-1-thunder.leizhen@huawei.com Signed-off-by: Sasha Levin --- kernel/irq/timings.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.30.2 diff --git a/kernel/irq/timings.c b/kernel/irq/timings.c index 4d2a702d7aa9..c43e2ac2f8de 100644 --- a/kernel/irq/timings.c +++ b/kernel/irq/timings.c @@ -799,12 +799,14 @@ static int __init irq_timings_test_irqs(struct timings_intervals *ti) __irq_timings_store(irq, irqs, ti->intervals[i]); if (irqs->circ_timings[i & IRQ_TIMINGS_MASK] != index) { + ret = -EBADSLT; pr_err("Failed to store in the circular buffer\n"); goto out; } } if (irqs->count != ti->count) { + ret = -ERANGE; pr_err("Count differs\n"); goto out; }