From patchwork Sat May 15 07:29:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 439433 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp967341jam; Sat, 15 May 2021 00:30:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywSCxEkZPV5Z/4M/TipQv93CFKN3AupUfFDEmMs00JIWvKJE+X/kYTzsNPQQbf8Y5jSDe5 X-Received: by 2002:aa7:c54a:: with SMTP id s10mr20160502edr.132.1621063812434; Sat, 15 May 2021 00:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621063812; cv=none; d=google.com; s=arc-20160816; b=QapfVWtEcCTgQ9TeKMsUwUpGkUOTk4P4288jpPQYKYFDLQTjiGUI34nZks9zttQx2/ P5jBe/GhxfhRNfQgzRipVkCb4Zd37P8NBzZyWzPZXhp2mOn/kchQBS/HjM4tKWwQuhz2 wvuyzoIoLjEnMtXGB4qK2DFYCaNTcpCigNBMC56t7EcmWY39fNQrKu46hbIMSLQjC2JQ XxwnN3ZkrTS6ZduiA1stx9pzbPkdO3min7oTYVD3+hP5tPQt0IWkkPyiYG3qPDDqv6dA /uThPt1bbBF52yZ31HV5AO2WnOzPoXhQUx8MaksICgARlseanaxLpW6WRr7FehsvP+uA qBwA== 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 :message-id:date:subject:cc:to:from; bh=6l3RaJlpyg6ZPvr0dzKdv2PbIWKy7EHxLqkQHA/OYv4=; b=VKZwzm32odIceYLqM3zlQpGJA+D3u+oMWLMs+w4HC4k1Cp+f9siCGihLPdnl9xsNil ULIgQiQPpq6tYlRuR6vPH72GVaKxYZYF1u9Uz7s/Yh7UNhO3C6p0ZgsW8/MKFyn8+UiS lVedbq1gDjyGI/3K4VBXzt3yK6SynhR3RwqLGB2xcaIibSsrReyZfT7Mp+GEf6Q2jRr9 OVwj2zf7hV/s/MUP0+rhlekSSgCC2uQ4C8hT9ism4rVwiGZgN2XVg627ON2s0rheFZF3 A1Y+7e6ZCVYXXPCVhM/Ot5ZyV0ewNMzZ6xLfCwmiLb718nMoEBdSG3BHZiDfhfepWAyu hXFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si8555175edw.264.2021.05.15.00.30.12; Sat, 15 May 2021 00:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232263AbhEOHbP (ORCPT + 2 others); Sat, 15 May 2021 03:31:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2988 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbhEOHbO (ORCPT ); Sat, 15 May 2021 03:31:14 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FhxnG6MdjzmVnP; Sat, 15 May 2021 15:27:46 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Sat, 15 May 2021 15:29:54 +0800 From: Zhen Lei To: Michael Buesch , "John W . Linville" , "David S . Miller" , linux-wireless CC: Zhen Lei Subject: [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan() Date: Sat, 15 May 2021 15:29:49 +0800 Message-ID: <20210515072949.7151-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- drivers/ssb/scan.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.0.106.g9fadedd Acked-by: Michael Büsch diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index f49ab1aa2149ab2..4161e5d1f276e11 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) {