Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp876338pxk; Thu, 17 Sep 2020 20:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT/nVoTkdW8e7K7zU3QL36kAfGWzt3PKm57buuR9i2K8BwscitRKJQrYY95aWbwLrLVKZd X-Received: by 2002:a17:906:aacb:: with SMTP id kt11mr33563602ejb.294.1600398181114; Thu, 17 Sep 2020 20:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398181; cv=none; d=google.com; s=arc-20160816; b=GH+oqtGp0Ihtq9jTUYgIm+uH1pCXjwVWdahARsu5iJM/X48kYaadaU/HYi7MAmp69c mUzMq/P3CgmtsOX7tuLhjOASmWAz3BRa+F1xGDtzLr3QJl4JhQSzWIUu5pbWTKmR6yM1 qa4dXvBmNWXanRMCR/yYLP+GmSJoEpKgIxmadDGcWCl3eVJU/rXFLhIEF1Ry41nfexo2 fCQ2aXkiqXo2AbXQUFINDDQIO8eU9cmPcYjXIvyybXo89tYLhQRafbZvylIEhiEbwo0x vW15rbeW6JTEhWgAzNVswBRIr3pMO/FDzt3PMXgJ+79sgUYgShI/cQcrt1YEhUXV59JQ Xn/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bzethJ5wrFUdCqsK9wKNGG1sSFQy1do95E8bBe/RshI=; b=fmCpMOn6DZBL/UOAO/SPCyPv6vDhZkab8fzhTefO/TrXDUnOGWBphbnnxozRBmdlRX P6wEUpLd88vyRksyt21IOEeCk59JQtVFLg7PSLnmoJXRsihCETJSLjCCSF8YexYecXAn gFdXdVJ7eg/59s/98Oacc+RqXmUExCcGe/EeE/C62MHg7MbhwpJJdNX53daNeLsoFIg1 bP+ZHJq5YBNk4PyTLAEptuvoW6Sd2xvUsBG7AlcOA7iFSkECneq+bJDhV8i7lnlTj+me yIY7X9tt7LPaiRIz7hEQTM8zhawCemZyemXOjJLSNlmT26bAfNfqreUWQlI5FlwFzQH6 uHRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cs5tPrAN; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do18si1247406ejc.13.2020.09.17.20.02.37; Thu, 17 Sep 2020 20:03:01 -0700 (PDT) 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=Cs5tPrAN; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730407AbgIRC6c (ORCPT + 99 others); Thu, 17 Sep 2020 22:58:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:55092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727085AbgIRCGP (ORCPT ); Thu, 17 Sep 2020 22:06:15 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FA07238E5; Fri, 18 Sep 2020 02:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394772; bh=+8zcmXZJ6yBrRp+sgI7MDoip1ErVsbFrDnQmMDqs1Z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cs5tPrAN39pPARP75QllHx+XWldQJw3obrpv49NnGM7aTz5ENnzZW0YaqF9SfD9SE ynJ/uFEhIESADvIhAik3f8Jnxb9IK4TpgA5ZWjPquGHQSO+gKtLoRHQ3SZm+2gwERs ENxG3G6dPluYyL/OY0NUoPCb8Chbvv8Ep41pdzoQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wei Yongjun , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 5.4 247/330] sparc64: vcc: Fix error return code in vcc_probe() Date: Thu, 17 Sep 2020 21:59:47 -0400 Message-Id: <20200918020110.2063155-247-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit ff62255a2a5c1228a28f2bb063646f948115a309 ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200427122415.47416-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/vcc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index d2a1e1228c82d..9ffd42e333b83 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -605,6 +605,7 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id) port->index = vcc_table_add(port); if (port->index == -1) { pr_err("VCC: no more TTY indices left for allocation\n"); + rv = -ENOMEM; goto free_ldc; } -- 2.25.1