Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2104103rdb; Mon, 20 Nov 2023 01:56:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSRNE4c+CQPXi3n1xpDLFaMvyW2I6v4AMkzfkpS+VtP1ESRQhBBDd8741i3gMSkwuiDWDJ X-Received: by 2002:a05:6a20:a218:b0:187:d4e3:c13a with SMTP id u24-20020a056a20a21800b00187d4e3c13amr6707950pzk.22.1700474185452; Mon, 20 Nov 2023 01:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700474185; cv=none; d=google.com; s=arc-20160816; b=XSbm00iorJR1MWVI+hgal5A9HSV9Yz5/1r7+MplphChTo8DO20Hj7Zp8dJvdySADeG s+OBuqoW9igdkvdLFuHpufB5dO4lA2xtsQc4uN53bgUOtuxPABtrJgj10r4pyYVMETO9 EHaxElCSVNEkTCAidL/ebpuEzrYO9fqKjFGAS6n8z9MxtEMKXRjpdRkX7fMMrgaZtimQ pFF+OCYkVh37ednqJterFVeC2Nu3z1jcc4lDkUg8hL0qv0N+QFLr97B0cFqYUDSR0Hz3 +YPVBsZyShI05WKmDeYVi0DbxJOFid+FOjiyT4G5mhMbHmK216eg+gabZSydvrZf31Ra 903A== 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:cc:to:from; bh=zONj9VbwBRjWBw6FuuoebMWVAQkBpwQY/o/iFyNaPOs=; fh=B+qhZ3PwTooQJoa85CYtjnoL+BJbjmttsXH3YSLFtCE=; b=H2jjjLrKN6o3nqX0KTcPSXjabx+/c0iM1dpGTWs1nz1s5OAUqnqW5bBmRDsCwAOPmf CdDncJ6dlyF8hUL3I0DMOpy/mOLI2ILYzKyJWt/j7RH0g8hFdFshBxmSo6+Dt9/y6Fq/ MIzmQwqFF2l239UVECvFrt/fiJ5lc/8nrKQDqVE9cIhrUt8han8z/DMlX1nXFVTDh8GH 1UwuTHYB8KiAJox50nN2kS83Ve+i4avViE3hVebohDet4NI7s8LOkTndVS+shIgR38Tv cESgwwfM4j/gXh5JKX4O8zAf0t34c1vnbe4H9euk8y1oP807udFW8CiqPzKLdfX33A/T MhSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d10-20020a17090ac24a00b0027cf6bb27dfsi10178850pjx.39.2023.11.20.01.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 01:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 162DD804A20A; Mon, 20 Nov 2023 01:56:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232507AbjKTJ4N (ORCPT + 99 others); Mon, 20 Nov 2023 04:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232176AbjKTJ4M (ORCPT ); Mon, 20 Nov 2023 04:56:12 -0500 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 4118A8F; Mon, 20 Nov 2023 01:56:08 -0800 (PST) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id B718C633E6ED1; Mon, 20 Nov 2023 17:56:00 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: tomas.winkler@intel.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: Su Hui , alexander.usyskin@intel.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH v2 1/2] misc: mei: client.c: return negative error code in mei_cl_write Date: Mon, 20 Nov 2023 17:55:23 +0800 Message-Id: <20231120095523.178385-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 01:56:21 -0800 (PST) mei_msg_hdr_init() return negative error code, rets should be 'PTR_ERR(mei_hdr)' rather than '-PTR_ERR(mei_hdr)'. Fixes: 0cd7c01a60f8 ("mei: add support for mei extended header.") Signed-off-by: Su Hui --- v2: split v1 patch to different patches v1: https://lore.kernel.org/all/5c98fc07-36a9-92cc-f8d6-c4efdc0c34aa@nfschina.com/ drivers/misc/mei/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 9c8fc87938a7..7ea80779a0e2 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -2011,7 +2011,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time mei_hdr = mei_msg_hdr_init(cb); if (IS_ERR(mei_hdr)) { - rets = -PTR_ERR(mei_hdr); + rets = PTR_ERR(mei_hdr); mei_hdr = NULL; goto err; } -- 2.30.2