Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp264401pxx; Wed, 28 Oct 2020 04:28:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlaUPd9IseGSYGWeT2mLksk2YwVqBg3rgQDBhNGjsUD5fqJaj+6ZWywnfbWkhn6EVtvK5V X-Received: by 2002:a17:906:4a98:: with SMTP id x24mr6847128eju.319.1603884520966; Wed, 28 Oct 2020 04:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603884520; cv=none; d=google.com; s=arc-20160816; b=Zj4wyiUiDRZh6Bu6BV8ZDj+91QuouqQ2ibby6Q2Odnl1qKK8bQqXebWt8oxHaTKEaa iR+/yfUyGLnlF7hf1/0HhQVR9nDZkym0+w4TYWe5nXMZ9ZfyRdl+n3VoEMqsBvj/7YqJ Q3aF0JxNknOfXan/nobQ65JFU8DSta0XdnA0f9HKEUI7YUuatbWIgh3jIS9bLUMP7nYe DTq/06xOikLFEy4LEZKwOerz78CVXOiRtrkCcu3tMm8MPweYQTf3L4nS/fhtFpORS2aC godBnV5meolcavhhSPmNIhBPeW37jpyesMVvYfZCz+IQxam9pwQxHamEq/3qSifjejHK Ibwg== 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=4OHCpFHjpN6t6g2tNMWY6PvHQG81aeWPQc6Il7Pr+oo=; b=fKcoVUuIDAqozAOT8f6lUDAOw7/Z1UqbkvCopunnKsECGauLkTYrMT9Tku0vBHFyb4 8GvxccgGXwwrgKOCjigIbIT4f99dXrDr4lPVCJMpWTCRk0GZmqZEFrbeTJWeNlFypW8P QqWdlwRvOyN3pxZ9mTJFcdSZhrnchVdw2dFbzsKD6JAR8vwr6lIarz84sPCa1uSGPpgl MNNQhG2b0+Fo9nyiJJFCidpRKztZkeQAzFucYA7JxfqToW//we9KkbE3FGNw/4ewBT6O g9Hd1Pa39Cq1h9tlk6gJJbw4tHvYrZtSnNVE5pe9oDcHrLBHmuXuu9tI6O8YFp98aJPR 6FLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uL3wC6lL; 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 b29si2827715edn.354.2020.10.28.04.28.19; Wed, 28 Oct 2020 04:28:40 -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=uL3wC6lL; 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 S1790521AbgJ0PEo (ORCPT + 99 others); Tue, 27 Oct 2020 11:04:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:35986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1789335AbgJ0PB5 (ORCPT ); Tue, 27 Oct 2020 11:01:57 -0400 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 83D2320715; Tue, 27 Oct 2020 15:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810917; bh=fBS5LtE5OqagiTeqYn5RUhthV+ThQHXyDy+qSbxygPc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uL3wC6lL0h+xuWGdfeSkPErVK85JPCz0NHoEO4jg350H3FkTEHcD/T0V7d++5RUIj tx1Q3NTA+BSipaQUwzhvE/d8ZrbHYogOzAfESVy2vNZ1rVmrYSypbbwLM+gPg1qQLl Raw4N0lTxBstuKGkqOa3TH+DcA3By2oWPZJJ9JTQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corey Minyard , Tianjia Zhang , Sasha Levin Subject: [PATCH 5.8 307/633] ipmi_si: Fix wrong return value in try_smi_init() Date: Tue, 27 Oct 2020 14:50:50 +0100 Message-Id: <20201027135537.078854373@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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: Tianjia Zhang [ Upstream commit 8fe7990ceda8597e407d06bffc4bdbe835a93ece ] On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: 90b2d4f15ff7 ("ipmi_si: Remove hacks for adding a dummy platform devices") Cc: Corey Minyard Signed-off-by: Tianjia Zhang Message-Id: <20201005145212.84435-1-tianjia.zhang@linux.alibaba.com> Signed-off-by: Corey Minyard Signed-off-by: Sasha Levin --- drivers/char/ipmi/ipmi_si_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 77b8d551ae7fe..dd559661c15b3 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -1963,7 +1963,7 @@ static int try_smi_init(struct smi_info *new_smi) /* Do this early so it's available for logs. */ if (!new_smi->io.dev) { pr_err("IPMI interface added with no device\n"); - rv = EIO; + rv = -EIO; goto out_err; } -- 2.25.1