From patchwork Mon Jul 12 06:08:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472959 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2676396jao; Mon, 12 Jul 2021 00:13:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqpL4ZsWntlSW6VOW4+r/1rjlDPglpJwKQuEteQMvMtIEKAHN6hv7adPsrf10ZucThVErr X-Received: by 2002:a17:906:7302:: with SMTP id di2mr50113338ejc.409.1626074037881; Mon, 12 Jul 2021 00:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626074037; cv=none; d=google.com; s=arc-20160816; b=Z/l7ZVtLfw+xqmzPScYvly1/kNXUksegv7Q3X7zwr7hqM94AfLEDP3fgMjbhwCygS6 EpqSUGBOeWy5fWzXmQ6OxahWi2hyzp3Gk5W4LVytLWOjO/KE/pwxm4JuGrwhAOPcPDSN ncldvhc16dX5OqT4aePMCC+TF9RlLDYYhJbKEeYk3NXsVrYosr0ES1Nn09BQ3SRarvHr 2UFZmXJvgQE6GGOYFiqYlho3bHBtLzQWBcJc5hCY4eDSv4KeW/YBw5Vyb1b3PdJWEnNQ RJJUHHjy6gp4LVeE40Kmry0AK9McSuxqrOl8SeYSUMuK4tWiJTj/D7gizFiV8me7FrT9 ZTtA== 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=4gfBI2IuuIa4xSMQSxbzv5D0XetEmX5tZB9Bcmct1qc=; b=SHcubwyZqx0ZzcI24HnvITaZhlfNTLDMrToIEy3/MCbsi+iOniiGdjOkdQr/4A4Jws Yec5EmzIM3N9TgocuvvJUp040MLaPnc8kwnMeyVPzA1a3tWkpD7yT19L1sjiuIhytcOZ fVbF5tReDOwG4YtAN/fKLu6ryqtViNMC98xmgRQfYUY7rPr+gLwDcw4XAszpjZL+9eLh AwZ7ufIprPImzg16enmamutnC/mKv4BZbX1UYeZsDKEHvt/CUMCEGKGC5eEa+EZy/nmV kj/WTVI8Y3I/uqC4/3hAnbViXAxq7yX6EQXohtzm7QcaTyXdQB1bJfQZ3seCQpJE0Mq+ FM1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zB+460lt; 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 i15si16552108ejh.658.2021.07.12.00.13.57; Mon, 12 Jul 2021 00:13:57 -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=zB+460lt; 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 S243564AbhGLHQk (ORCPT + 12 others); Mon, 12 Jul 2021 03:16:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:46988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243375AbhGLHPl (ORCPT ); Mon, 12 Jul 2021 03:15:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26A74613EE; Mon, 12 Jul 2021 07:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073926; bh=HH/oR1MAak1gZXBUdVPQsHiHbw5NhvczZv1qs8GQY2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zB+460lt49bfJCud0GAH/cQjX1FMHoF4PNLbH8hc2epJaDK0yOALcvZg2HizYhX6z PsLGe3K11M1MAdH5rRQifQ6KkOrpmKVLvqSo5/7gV6X96faRHAVvSagO98q2P1PZ6r kk8Q2t6dBdwGex03OYhIaoetgLdmOJReoV8djxtU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , =?utf-8?q?Michael_B?= =?utf-8?b?w7xzY2g=?= , Kalle Valo , Sasha Levin Subject: [PATCH 5.12 407/700] ssb: Fix error return code in ssb_bus_scan() Date: Mon, 12 Jul 2021 08:08:10 +0200 Message-Id: <20210712061019.673555506@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@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 77a0989baa427dbd242c5784d05a53ca3d197d43 ] Fix to return -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 61e115a56d1a ("[SSB]: add Sonics Silicon Backplane bus support") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-by: Michael Büsch Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210515072949.7151-1-thunder.leizhen@huawei.com Signed-off-by: Sasha Levin --- drivers/ssb/scan.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.2 diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index f49ab1aa2149..4161e5d1f276 100644 --- a/drivers/ssb/scan.c +++ b/drivers/ssb/scan.c @@ -325,6 +325,7 @@ int ssb_bus_scan(struct ssb_bus *bus, if (bus->nr_devices > ARRAY_SIZE(bus->devices)) { pr_err("More than %d ssb cores found (%d)\n", SSB_MAX_NR_CORES, bus->nr_devices); + err = -EINVAL; goto err_unmap; } if (bus->bustype == SSB_BUSTYPE_SSB) {