Received: by 2002:a17:90a:37e8:0:0:0:0 with SMTP id v95csp7140108pjb; Wed, 16 Oct 2019 00:42:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPOlO4UYT+YOOn6hm7b/2FnkToYqcUEuQkid6O5amjZCRA/iUVU5ZLuWPSiuAevW599SZ/ X-Received: by 2002:aa7:d04c:: with SMTP id n12mr36649780edo.52.1571211770472; Wed, 16 Oct 2019 00:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211770; cv=none; d=google.com; s=arc-20160816; b=axyQGwrnd+/Lthjsdgdf0z6VM9GZMyTlL9Nj/BxY5YD8HLSfdJkOOfZlrgKPjSWtuF 0ztdpXG+7iLtc/lJRi7EUIY/zTxcCniuuJbMGnfWMSQ85XO40TjLn6BTZTVDnlOZNmsY 6j96/VSTAXUNEP2d/CB75zuvNr60LWQsX0tXEI2JCi+Q+9MNZXRl0WhNuoezQIScDpb7 NrrO992RnAuCHIZhJZp/ux+qfAa6ok8p7yFCF8VL6nh8FtobwF6ea9h+XcHTxFgereNH HFAUwj8EoqvV+mgNbjrlYkevyg+11SKL0SGGLS/Gs++HJz8tj8T2GEvu+kgk+HK/rSFG uCZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=eeNkvCp5we8B1sIjAqvddZdJtVv7b9TX9EWbxqks7Ic=; b=MWCG18BAVmdJvo1WKiIXXKJel2QuPPyFl5R0g6knz+aXijedD4D4U/72cFQ3UoXhuV HDWYw6a+abdrlkKirMOSa1ISdS8LkrhAVH567exYmcQLKwJPKqu5+7uORYXPnRSC6NtP LxREFKZnmKe1osT3XmN61bUvShNnE4/MdPGBBydDJBLN8+woVXr92SSMRjRea+z9q/in dJ+iY8A0qkTWTZxzODM84EaS3IpPfLj0n1bdGL1+8oNlMP4+6sGSpAa3gsHD6BxDpjuc 31InwHHjY6i5fie8HjBNcZTqb1Drt0MTCYubXPgHMRYsREi+3FK3snDkp9igVcZv7X6o nZag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d52si14497389ede.370.2019.10.16.00.42.26; Wed, 16 Oct 2019 00:42:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388446AbfJPARW (ORCPT + 99 others); Tue, 15 Oct 2019 20:17:22 -0400 Received: from mga12.intel.com ([192.55.52.136]:50706 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388379AbfJPARV (ORCPT ); Tue, 15 Oct 2019 20:17:21 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 17:17:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,301,1566889200"; d="scan'208";a="189517714" Received: from ipsg-l-lixuzha.sh.intel.com ([10.239.153.12]) by orsmga008.jf.intel.com with ESMTP; 15 Oct 2019 17:17:19 -0700 From: Zhang Lixu To: jikos@kernel.org, linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, srinivas.pandruvada@linux.intel.com, benjamin.tissoires@redhat.com, Zhang Lixu Subject: [PATCH] hid: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring() Date: Wed, 16 Oct 2019 08:15:59 +0800 Message-Id: <20191016001559.27947-1-lixu.zhang@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When allocating tx ring buffers failed, should free tx buffers, not rx buffers. Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada --- drivers/hid/intel-ish-hid/ishtp/client-buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/intel-ish-hid/ishtp/client-buffers.c b/drivers/hid/intel-ish-hid/ishtp/client-buffers.c index 1b0a0cc605e7..513d7a4a1b8a 100644 --- a/drivers/hid/intel-ish-hid/ishtp/client-buffers.c +++ b/drivers/hid/intel-ish-hid/ishtp/client-buffers.c @@ -84,7 +84,7 @@ int ishtp_cl_alloc_tx_ring(struct ishtp_cl *cl) return 0; out: dev_err(&cl->device->dev, "error in allocating Tx pool\n"); - ishtp_cl_free_rx_ring(cl); + ishtp_cl_free_tx_ring(cl); return -ENOMEM; } -- 2.17.1