Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp287669rdb; Tue, 31 Oct 2023 07:34:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEhZBI/LnYlGbzM9vTqn/VJ/RreRk8Y+rwWLkKkOEuAYrCqrb5sm+i4qZDlx+bt8evOWMO X-Received: by 2002:a17:902:a38e:b0:1c9:cc88:502c with SMTP id x14-20020a170902a38e00b001c9cc88502cmr12314117pla.69.1698762855447; Tue, 31 Oct 2023 07:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698762855; cv=none; d=google.com; s=arc-20160816; b=HY4Dd/bf+0dNbkrfJcWWUhOyt9SW6Ka0Tf0N0DYmapVEw+bvunCybVvUwST6IbNqHw qCmfPyQwDdan8lY5TlZcue2keJos403VlVJ4nUrp3up9R3jSg2tpr2zRuTKPWW7b5K5g CeHD3Vr4kWtFiEPTgdy1HVwvxM79yWTWqaW7RlKveOdSmDBkszUqJoxsZDbDwQt35l2t TaBCZTgx8jjPnlkr5cIR0zvgnA7KgB34fRvpf7UEfx3pPBWLIIZpAzQH4jml8e9eMxPB mz2x4xGhhWlf+a0DLBLpEJdR510lOM3j7GOhkwWuta7qVZM4abphxLfLEK31MfwaM6Dv xu1A== 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 Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ky4-20020a170902f98400b001cc30057e18si1062970plb.465.2023.10.31.07.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 07:34:15 -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 703AB801D489; Tue, 31 Oct 2023 07:34:14 -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 S1344254AbjJaOeN (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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:14 -0700 (PDT) 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; } /** -- 2.41.0