From patchwork Mon Jul 12 06:09:49 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: 472840 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2643985jao; Sun, 11 Jul 2021 23:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx0l3pLY/Rgk5c1U0bTh8Kgr1aZJ+uzHntOHlSYYcuY6cSVV7n+9TpH+bzvPylXF7TgvVP X-Received: by 2002:aa7:d554:: with SMTP id u20mr63089505edr.50.1626071007569; Sun, 11 Jul 2021 23:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626071007; cv=none; d=google.com; s=arc-20160816; b=vGDMOl2ay5Wwk9YDDrBgBDB643oVEYsuCtpB9WlJbXdql3yNAmOt/5xdHRkD+1DPlS YkNjfFEFGPMa1MrbJw8ZsZ7/wu6amuzM653Xs2KM4RIiZt54+sO27z6NEJPZDR5OPKHI YRdxksN3ijn9/RH1bYdI3hvJGCYAPXFKlkZCp+xxbBJyUVtPDb1VKVvWI57Gks8yw9xO Wg4uoROyA7OSlWkUaBq9rJg9Ek6Qvy9hOgrwUgShBNLPN0owk/+95ZvZJWxkh7l6tGS6 5Cc2Bhvl2+hrByNrivaeBLNSFJTYx+p6rJWcH26DVB/MfkkCZvRIz1BXdA9BXUogDzcC H7Pw== 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=48bGOEWqDUEjpvJryHPrpMpj+dD+udNDqnQ2vP5/fWs=; b=f7pzEpm8q+Gs9GGETlI0oAihMTFRfWZveJ7NF2EWHcMqEXulelBtKqAZR86/6l3mbS aD8yf97Mz1uPG5WK5IVcQHFmtVUTHlROKt78s8++evLY58/jrHi72wMgIaPUv1em0a4t yxoETSHhPeIN8VdQW1/8OFavRRP3Ckg2cFTFf8ZLbddGz/l71ZGlPYekZLaQqsGhy3mf YCXtmZbVwYlOR8FGmBQ8MIWhn7wcg25I8lL5YC8+oCfEjuRC4sgcJ5FhRkh+YXVeu6vp E40JIYuSR8v8aTEECaMW6bAO2j5DL1gSCJETlZZVXHariUGx6Ecv3w8tQxbbG3nAikfy nKzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bs2/xuAX"; 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 t23si17704122ejs.626.2021.07.11.23.23.27; Sun, 11 Jul 2021 23:23:27 -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="bs2/xuAX"; 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 S235141AbhGLG0N (ORCPT + 12 others); Mon, 12 Jul 2021 02:26:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:39756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234750AbhGLGZM (ORCPT ); Mon, 12 Jul 2021 02:25:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C91B361132; Mon, 12 Jul 2021 06:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626070943; bh=C0/WtTy7uGcfywJh/Bg7FSsNQVVNIIPRGXcN/8bDiWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bs2/xuAXMb8mNSPbMC0Z5W9JyKs20cmqWRqibiMRAEL1mgr5loppJ2Pqa2cQ5e0Gi e/eEV4l457AX1It34FsROjal7NWausTq7VpM+FjarR3KgT6J6MBVG2izwZJYJjt/10 y0LN9e7ZqUq8eQKqrXq99qQDfmtjs97QRjH8YLgI= 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.4 205/348] ssb: Fix error return code in ssb_bus_scan() Date: Mon, 12 Jul 2021 08:09:49 +0200 Message-Id: <20210712060728.752393566@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@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 6ceee98ed6ff..5c7e61cafd19 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) {