Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3362103pxk; Mon, 5 Oct 2020 07:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmONoH8PV7TeQQ0LuJgO0P6WFztPmz20Lxe1AjGdFOGHah0i/9juGn7bR19e6DgRhwhsSI X-Received: by 2002:a05:6402:945:: with SMTP id h5mr23991edz.6.1601909632706; Mon, 05 Oct 2020 07:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601909632; cv=none; d=google.com; s=arc-20160816; b=wcded0DLFMfNAOK/WYdla3/8DM26E4E07np2UpXm5DmiFfXBDVqVoHRq9hfAaJ+HOA 7AW7uYk1XYD1oN7RbTxMrYrZoBinueqx9sL2rV9BMoSoUqeJD1B67NM2S15SyWvisHyS RoUs509tiRU3aGGTXctTPGeYu9eSTqKKo6MNAM8XG65KaHumD0txNcLleaAhL+f9HSZM PmLHAdJmvILhw5MXBAlQEw7fwRTHMg56NYsyAXn1DDmjCtSs+SLJVmg330nNLbeswiFI 6jt5B2k+ogQj5KBZClnq8bE3IuNj0d0IN0YZqF8DKD87rqQjVbn9/sucTACZO6x+aXbU lEuw== 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:to:from; bh=cm6tyrUdqhRYfGOH44UCHTxUF4BVhg7EdG3B1l1LzuQ=; b=lnropM12SZB0qgWogsPpYduY3Mn3gsyDhTCduo2ngSXT1SbOmVkpfv3WhV09YOtPZc HAzfxAU0a84z5/wmOnsbbHgXdLBFQvkGU4dVh8o7iSp84WGSGduNQh5vk2UcRtHgGwQ7 bxLRnCAbUhoKrLhs0NMY2ULD0spzNKN36W8LpMTh61F41u3iWa8wWNkenyswboAbMyNX LFHj9Op0ISJ1TSWs5hk0i8jVeLd5VvykRP6oBFQsPF4tP1y4FwknU6/e65xU0JZaI2fS 6S0Q+lTm1tVSLpzrLh/SzK2O9r2Pl62nlPB/xjrQ1SGM5QjWexAnktKbEOaS+xh6w0aj kAZw== ARC-Authentication-Results: i=1; mx.google.com; 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se8si2948711ejb.251.2020.10.05.07.53.28; Mon, 05 Oct 2020 07:53:52 -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; 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725994AbgJEOwa (ORCPT + 99 others); Mon, 5 Oct 2020 10:52:30 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:41948 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbgJEOwa (ORCPT ); Mon, 5 Oct 2020 10:52:30 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UB2zXS9_1601909533; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0UB2zXS9_1601909533) by smtp.aliyun-inc.com(127.0.0.1); Mon, 05 Oct 2020 22:52:13 +0800 From: Tianjia Zhang To: Corey Minyard , Arnd Bergmann , Greg Kroah-Hartman , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] ipmi_si: Fix wrong return value in try_smi_init() Date: Mon, 5 Oct 2020 22:52:12 +0800 Message-Id: <20201005145212.84435-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 77b8d551ae7f..dd559661c15b 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.24.3 (Apple Git-128)