Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp805176pxb; Tue, 3 Nov 2020 13:02:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQCDvPag6nzjP84Pnq2F3dvF2EaUUv8K0Jw1RX37Hfk1HoL08AWoZsuxV9CTBPisA8CPnz X-Received: by 2002:a05:6402:1214:: with SMTP id c20mr4359682edw.182.1604437351707; Tue, 03 Nov 2020 13:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604437351; cv=none; d=google.com; s=arc-20160816; b=kPaKHC6S7GCg2tiIFEv6x2+syS0XLyl1eOd10sA4FvTx4/QTFtjZ0Cta9fKxn5mzYH EWHvPz7MtnjcgqoKD86WA7SGgZYe0ciq9LZq0/fW+NajKv54//vqYi60WXVfVWZsQ8xN emrINyIqL6GWsMjUNULzQSTY5F8ExQabNPavau+Pb2yK2CajQtqq8j/Rffe/uXpawWPs vE78Yg2FNC9KqZqB8EXKFJbRlm+eAtYNcC2Nm/+F8YXz3Ga//yr4V6CGLtyAV7Mjyd7u jOnUmhEtoxl5DLzRdxd+3MpNMYJ7AkCX93PWMJ/KYcjgvoSLANKbG7OBjxaEDZS6B5EO kKmw== 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=roRr36xzA9XAr3dPkpgpLxBpOitVRomqY/55P2z6IOE=; b=NPUQ25NoL4ibIRg+TQyhpLGrs9W8f2NAzI5zOxIyeTzdr1lLlZf0wyx0fcGvTz6HOP x0YdHcxucEmsaSMABhRcqsxuTzlNhTN10U4FPYb8Q5ygQF5PMeXCt7aePr2+qtMLVuux 5F85BFYuVoIlBXPIyslpPNgQjLH26KtFWgjiEKTd1fW4hjag6CsIeMw/pkLN+LapWXl8 CTZnSGeRXDXmYeISzLCKYFuO+QlJ6cYHd7Cz8cGAl9YKtWGdGGH5MKu9TxBVBKCA7oP3 U8zBSh6BRZZaT1d0e2Dz1GAGJVQshJoJOHyCbGLnye6PG/gXUY1mRo2n8JsJxa6/5t7h 17Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xP8zwcef; 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=fail (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 d20si10786810eds.29.2020.11.03.13.02.07; Tue, 03 Nov 2020 13:02:31 -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=@kernel.org header.s=default header.b=xP8zwcef; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733291AbgKCVAt (ORCPT + 99 others); Tue, 3 Nov 2020 16:00:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:36844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733288AbgKCVAs (ORCPT ); Tue, 3 Nov 2020 16:00:48 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EBF6223AC; Tue, 3 Nov 2020 21:00:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437248; bh=2Yz2xEErkZQJQOISDsFOjOtFmt+uEt/xKpdPrlvAbeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xP8zwcefFMtOJYOeUuJ137eURp+EyTcILsr4od20/0LaoTbR3TDGOvMhgwFDDIhuw mRtgF3XiqivTEJ3AYtK0oPJedvegXgpdWcJBmFCn1pqJklFsXbCJHNvO7D9HZGRDV1 NXvGUPNSxatzW1gOdIEpI82v8q6/QvSPxrQPnrxI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Van Asbroeck , Jing Xiangfeng Subject: [PATCH 5.4 210/214] staging: fieldbus: anybuss: jump to correct label in an error path Date: Tue, 3 Nov 2020 21:37:38 +0100 Message-Id: <20201103203310.280795262@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@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 commit 7e97e4cbf30026b49b0145c3bfe06087958382c5 upstream. In current code, controller_probe() misses to call ida_simple_remove() in an error path. Jump to correct label to fix it. Fixes: 17614978ed34 ("staging: fieldbus: anybus-s: support the Arcx anybus controller") Reviewed-by: Sven Van Asbroeck Signed-off-by: Jing Xiangfeng Cc: stable Link: https://lore.kernel.org/r/20201012132404.113031-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fieldbus/anybuss/arcx-anybus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c +++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c @@ -297,7 +297,7 @@ static int controller_probe(struct platf regulator = devm_regulator_register(dev, &can_power_desc, &config); if (IS_ERR(regulator)) { err = PTR_ERR(regulator); - goto out_reset; + goto out_ida; } /* make controller info visible to userspace */ cd->class_dev = kzalloc(sizeof(*cd->class_dev), GFP_KERNEL);