From patchwork Mon Sep 13 13:12:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 509743 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp560414jao; Mon, 13 Sep 2021 06:33:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0fGwleekBDJbyzoSh/fQJJaTPBMqGPnvtYIuOg1MQKShDlOD5UFYXjlxx/IWIpFNke798 X-Received: by 2002:a05:6e02:1144:: with SMTP id o4mr6618022ill.264.1631539892723; Mon, 13 Sep 2021 06:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631539892; cv=none; d=google.com; s=arc-20160816; b=uPGDjVb7nvT75JwGVqj8pLAN6nCIVXH/+p7EBI7SF+F65jG9x6ZzAfQgMRKaRQKnzs 9bFa3io2AJo9C9ZZcix/B78gykYIJRzCbWRfJZrgNblPsx5Unp9ymjNkMyYsb7jdAi0z bJzyvL/uY/qDRpty16P+JLI0N7PCsj+xtduHMYWTbxzbFrQxz6oVWyMFn4oHBL/r2/V1 ox8AbAGymNHkBOh8BWmms824+muYg5zukWgsF0wIluXuUCxTXxKuWmt24UT2m/tsnyHo YvvBs76X632iDXOPkyOdzH3dRUjFTXOu5pQdzlm9P+CP2IEgil+fFDUn6Jij69exzriu s/DQ== 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=JKx2STGbZIr0i7fFZq2IiKxoXa28GSO1M+VsyllagSc=; b=quFR/MvUYB2Yy8P92EXFGpCHDLLaebIpFoh2KC7WeaigNm5hBmhkZ9uG0e//nHJoUA 2+pmydv2YeIpw42D4LXoDJD293SMxTH318OIbHYsCagjQjuIxRiWLtSADST4+Qs5+ls9 JW0D0srOqn18FUdbnfMKKeQPZ0JZRDDc2jxRxjAz9liu5YRpsLkdnrkvaPpbqJfHri5w 5N0cQ0V6W0h/wLpgWOl807yERDjh+rc3BFHRHMaKsCekYmdi2WO5hPFXAvvSPJa9wH+S HppVjiIkpL4RB5kSTw2pNNeWjZWCPOIhnRPn07tDzt94dWoEZcmGUMHcGi2dpeDuObMj 88SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bq2FOwqk; 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 m9si6915507iow.85.2021.09.13.06.31.32; Mon, 13 Sep 2021 06:31:32 -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=bq2FOwqk; 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 S242460AbhIMNco (ORCPT + 11 others); Mon, 13 Sep 2021 09:32:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:58418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241170AbhIMNa5 (ORCPT ); Mon, 13 Sep 2021 09:30:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B4936121D; Mon, 13 Sep 2021 13:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539507; bh=Powk3zdHPssuy5WoTf+6drC8w4XJWsM0Ck6Exx6sqd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bq2FOwqk7cKSUBQCtFZi/WYzuTqBdmEjlDvp0Fgx8I/XVDpgqPEqs7Rubmso7Re74 dK6ar3HkUnhwbfboQsRXiVSI2/hZUPKKhr6S17LMlMQTy+XikkICr6FVEociF1eVDj oH/ka405v7uuHc3cSue6U+rxTD+/rL/24hEmbC68= 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.10 051/236] genirq/timings: Fix error return code in irq_timings_test_irqs() Date: Mon, 13 Sep 2021 15:12:36 +0200 Message-Id: <20210913131102.093342118@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 6990490fa67b..1f981162648a 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; }