Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9121738pxu; Mon, 28 Dec 2020 07:09:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIwfMJnjqnZuAiBfkzaaRFNeaKtf2Hbi3ZqPtSEf9ozg4lIDsKt9NJPS3Iw2haJKwvLtCk X-Received: by 2002:a17:906:3c11:: with SMTP id h17mr41157556ejg.20.1609168193103; Mon, 28 Dec 2020 07:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168193; cv=none; d=google.com; s=arc-20160816; b=Dr+m7IGyEKFsMQasYRABxOwH9Q2FtAclCLw9FkxkZzUivzHn4BKaFGLu9YL9OoOLA8 h2M6aTU0zJd5lhynfr6UWdawW8Jwpr8lYgaYGz5ElzWR+gU3pKz6y9TzBuFf/xxmKHRR ISJOAoCNEs/J1w6YdlWINi4RRFNIPeTqefzkG9Kz/ZBGvSdM72BlpPzLrr+g4GQSTh9F eXZbV6bmiOcqGIO96wfYeZQGAuGJ9tGVeFG4mcAriHMsdsulgV3DNLCm+HBAICnqNwvE B03Kcw1jO4po/ra6XaaLP9pXXsSl5lsb83cn2qr8GgfTN2smxcVwqEhKayRHSD86RWk4 EqxQ== 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=0qQb6VjmHirXMD7AtisjxMruX9DB836urJ2+zth5tpg=; b=f+fAHoWaOtBsllPevKHCx1IU8aeYJHSWMGK5QpXmyUGK2L7qEyJpr9f+9QPC06naEn NG46l2E3gvIn6NV89rgQsjMpvM830B3398Rwk8jH8ehxh3VeGAD98X08BHLcLOW5L0NJ VS01myLroTG4pVG9QqXXFlTuAHXSywvsvfhw77liT58jAXN3OezEvpxjyDpNl1PhTPEK qTvdWkDMZ4RNcNJC7Rh6UBV0OS6Z3ASOOfVsp1wCuRl/AisjX2C6Jf0FbxRqKGgw3oEB mhm0s8dmhB3Um/rPP5BaDCgKrIBCvrQobNAJ/wk9OqQqbOpki/TyQab+tlyEVEhEIRlq 3D0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rd5yF79P; 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 bz24si19403838ejc.72.2020.12.28.07.09.29; Mon, 28 Dec 2020 07:09:53 -0800 (PST) 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=rd5yF79P; 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 S2438956AbgL1PHA (ORCPT + 99 others); Mon, 28 Dec 2020 10:07:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:44854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439001AbgL1OKT (ORCPT ); Mon, 28 Dec 2020 09:10:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD2C1207B6; Mon, 28 Dec 2020 14:09:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164579; bh=wZyR5rv27nXpWJW44xZWFHzMeEP09gHplB6lbNBH8ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rd5yF79P+z1/BcslNgugaq3KfNFt33T4Rtgcjs+kgL6sKrf+HH9gmF/yxmNLwqvVM 1gjmZehgDEbdFUT7tm5F9sSM82vtkipZqNRWiAYnQ6t9PdNql9kFPOceR/MWDu1Tlp QeLoHMZhtyT4t4/g0eMvKVV1TCBx789F8586DeUA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Xiangfeng , Sebastian Reichel , Sasha Levin Subject: [PATCH 5.10 225/717] HSI: omap_ssi: Dont jump to free ID in ssi_add_controller() Date: Mon, 28 Dec 2020 13:43:43 +0100 Message-Id: <20201228125031.760485201@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Jing Xiangfeng [ Upstream commit 41fff6e19bc8d6d8bca79ea388427c426e72e097 ] In current code, it jumps to ida_simple_remove() when ida_simple_get() failes to allocate an ID. Just return to fix it. Fixes: 0fae198988b8 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module") Signed-off-by: Jing Xiangfeng Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/hsi/controllers/omap_ssi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index fa69b94debd9b..7596dc1646484 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi, err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL); if (err < 0) - goto out_err; + return err; ssi->id = err; ssi->owner = THIS_MODULE; -- 2.27.0