Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp45639pxb; Mon, 13 Sep 2021 12:30:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvh1i+zoGvx5/ZvQJtcJHh/mS3fEjuHgh0/EwaYAGwZZ0n56vbVzg+IbXZFFtmm3AF5IMH X-Received: by 2002:a17:907:2098:: with SMTP id pv24mr1540980ejb.426.1631561430893; Mon, 13 Sep 2021 12:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631561430; cv=none; d=google.com; s=arc-20160816; b=UKLspQVdyf8i6GGlPesYmtOcmgNcFUj5AtaxLm6w27YRxY1nFoL1ZyqBncmKNQY2Qj kurYHWdkn+hc2250wwMzJlBShGyCyJmZOO+vbKtslUWvU3/h1sCRMuHHOfslAk00MDFh R0PsHTqiiLRoiBdkyRLc6/5/TYODad2fWSN+HmohPo497LSncrZlD4bSTqRh5bnCEfe1 Cp8U9269tM8kXcZYc4iXYaC7b7uaeugbtNUo539Gwi+f4gcm2pXIGZcBji/vs+JsXWJw QGjg+mSG63jLFFHFS3hne8rKiMZIdeAnYGOXvFoQimhJGTmdSTI1/LlSjUE8bMAnRsoF RQTQ== 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=Hj09rhKpRFaZ3EMdSbLkX3bbBHuqCmjyOJjYzB3J2QM=; b=pp2+HHnzwI9i9IlDRl4n4U6foS8L+GWcSlFbUJmUW/+dQ+QUYnZPjq/24Vzfgd2xV0 2fYPmSEJKUtPzUlnTJEbGrQRC9IUnIaTCAz2ezEFEo3xhic82phzSNY5oVSifx8QjWTe s8o39muu3vCPiakU71yqGXFslOjeAbvcoE74P9n9E6nuAOdbiXGEJct2gfXYZejnmgPN ejo7kUtD/MazLjAzS258Vo3alblnVcniO2AHxqebjA2Q/cqr523/KOGUQ88npX3ZO/ZF v+sJ2tA3Iy5vSn+1V0jzvLlQlkwBUSr2JfGQtHy9Xqtpp1OhAZNrNPVVVCWHbHl/m4R4 0DOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wtFdzsRf; 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 5si7941945ejj.698.2021.09.13.12.30.07; Mon, 13 Sep 2021 12:30:30 -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=wtFdzsRf; 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 S241352AbhIMNa6 (ORCPT + 99 others); Mon, 13 Sep 2021 09:30:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:35056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240150AbhIMNT4 (ORCPT ); Mon, 13 Sep 2021 09:19:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 360056113B; Mon, 13 Sep 2021 13:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539082; bh=ubLnOvhDD9HBiRyDL6wXMzREZ3bw2QB2Sm1N1wWnrIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wtFdzsRfJ6MG4y+HUtM2nQjcQ9tvWve+8NgQzl5smeJUY9RkTy2n8F/u6vcjMBPbM 7cM6GRJ21Q7WHmg8U7dPsXzQ05e2ybV8DxrFe0ju2KIup1n04+YCut+KLf8ShyRtxr BsLBfaxRW721b25T2vRm/ijvY6HbooEVEJMNRa50= 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.4 035/144] genirq/timings: Fix error return code in irq_timings_test_irqs() Date: Mon, 13 Sep 2021 15:13:36 +0200 Message-Id: <20210913131049.126722025@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@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: 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(+) diff --git a/kernel/irq/timings.c b/kernel/irq/timings.c index b5985da80acf..7ccc8edce46d 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; } -- 2.30.2