From patchwork Tue Oct 31 14:33:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Winkler X-Patchwork-Id: 160137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp284342vqg; Tue, 31 Oct 2023 07:34:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7SmxGIXHamjR4bYt3oGUbnVaVpeT92rmXWwmPMFG34K1PaT5GOj5LxkH7w/iXZN31BjQ5 X-Received: by 2002:a17:902:d4cf:b0:1c5:ec97:1718 with SMTP id o15-20020a170902d4cf00b001c5ec971718mr16517770plg.6.1698762857751; Tue, 31 Oct 2023 07:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698762857; cv=none; d=google.com; s=arc-20160816; b=l56ld3PIW4pTcjQLZ91hM0qS07afBs12ABH5hkM/Pty0ecUoU5YVgCuUEGZ4aUMAnO W48eipf6k/3DIiY7MaCY+vy4hkv0XjaG5kgY9lS6n33iJgZkEiPLYGK/6Fxsv2PfaqRL o+7F4NktTNKxvw9luO7POfvFMjKAvMyyN/mDGh7PPHqiLs615yd+qFop8jTi+6nGA3bC 3pKEmcmLihtTSEbWLmWYEBpdt/61rVxbX4OzmL1wjusymPASqfaRN/zNkzY0DnnkB57t a3RakfCG8IC41akRosVW5qduxVchOORCIfM1baBbqiZwD2e0Vic/kxo7UKJBHaBRyuBN In9Q== 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:dkim-signature; bh=REwCH9rWA6udKJF3kio91VaNn/tXKbAY9rgQ1fW3WHM=; fh=np4jDbLVnoqkv3+sUYlitby5vs5P86AOvvZOqGHaBE8=; b=PL+OhM6E3oQcqO3lMcY9crrn3x0hvbxd2fm7A6MFjK6VfK8Jw8ElpiQyM9jBcXvdbf BCJk+EJ/Lgc0k7g8LSUXVCfBXynrrhufc8NZh9Om9iSlIENFRT6/PgR8CUN+vrxKtXPv e9BiK+TF644Huxl3Aa04tAFZjimKaPKbcfMYM3aLVjruJiKtNkcj5c1pwtsla12QmOnQ aU+JD4r5rkMhxEYxLVFOvcZ9oFmivReVJgRihs/5uQRUQM5zrOEW6/4MekbMmjaYbnZk LfID21JEZyyvjwFR/eBdnzE/SVdDcPlyy1OpHSDgu1VOSVnloh/ZMiEThkWkw3cT3RG6 W5NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LhuuN3in; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id kw7-20020a170902f90700b001cae5766330si1063327plb.619.2023.10.31.07.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 07:34:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LhuuN3in; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CFA1E801D496; Tue, 31 Oct 2023 07:34:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344497AbjJaOeN (ORCPT + 33 others); Tue, 31 Oct 2023 10:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344314AbjJaOeM (ORCPT ); Tue, 31 Oct 2023 10:34:12 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73790DB for ; Tue, 31 Oct 2023 07:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698762849; x=1730298849; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=QbV3DUBys1UmgK8sfourJ8nZWaO+xnRgwCCHjxRv6fQ=; b=LhuuN3inYVzU/L3jiRKySRLgUkt3yQPaFSIFhFOAT5guSor+Rf7+yIb8 cpe+12jnbXlx6rNeOAMJMxMblnKzfqDI6pyKcSbkza4+6vqB2ElY4PISa 48j+UbcoKXsr0tqAYd6gfHUZ70deiMpb978NnrVuBRt6IR4rRYly+/2hm m75wCEixotl5Ys9bzov2hDJVJBUkt0hTiOsJccuoz6ddcV0yjX/BG3efj 6bEU6EIkjKXjT9RoahRiYsXuhvJ68RZkq+kx5xHJFzYZU0zgj6gbKAmK3 THGsm60CWH1hdJtdrwqtw1f0/gqAKd/wBal3NwRGgOXsnusbrX/nHPha5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="474538640" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="474538640" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 07:33:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="1092027480" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="1092027480" Received: from twinkler-lnx.jer.intel.com ([10.12.231.216]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 07:33:20 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , Vitaly Lubart , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next] mei: pxp: fix mei_pxp_send_message return value Date: Tue, 31 Oct 2023 16:33:07 +0200 Message-ID: <20231031143307.165612-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 07:34:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781281962080572656 X-GMAIL-MSGID: 1781281962080572656 From: Alexander Usyskin mei_pxp_send_message() should return zero on success and cannot propagate number of bytes as returned by internally called mei_cldev_send(). Fixes: ee5cb39348e6 ("mei: pxp: recover from recv fail under memory pressure") Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/pxp/mei_pxp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/pxp/mei_pxp.c b/drivers/misc/mei/pxp/mei_pxp.c index f77d78fa50549e69f0a0873b..787c6a27a4be60f9322c6aad 100644 --- a/drivers/misc/mei/pxp/mei_pxp.c +++ b/drivers/misc/mei/pxp/mei_pxp.c @@ -84,9 +84,10 @@ mei_pxp_send_message(struct device *dev, const void *message, size_t size, unsig byte = ret; break; } + return byte; } - return byte; + return 0; } /**