Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3173891imu; Sun, 9 Dec 2018 19:21:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/XWWqX1yn/iiwZoGxDapkuyTh5N5WcNxviYuf0sKke11SZBR8wdKXRbPQ2OuLYdzpsYn3Zo X-Received: by 2002:a17:902:298a:: with SMTP id h10mr10755671plb.312.1544412074638; Sun, 09 Dec 2018 19:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544412074; cv=none; d=google.com; s=arc-20160816; b=ovMTOSmCEZSwKHQQ/MtOXj94uHYgFdlCxLEugXMOGS72yl0/FspWgFX9O1bZoSgbCd yOH5OZC2tQny1wzM87owDCPvdI7gVWSUN4LT4t/6dKic/hk52nMOlQWVcUVJJYp99hNV q7zFO/8v49UHwidVfSponsPBQC3KW2GiIJAAgcIOqsgVaNdAmVZ88XYs43iCWneKaBD4 HJLnVhP7idz9r8HsVkOURwVPzDlB0+z+csn1MF1piNtgwKA3yNEwrmBwKXflK/n210dt JQ9xfcDvk62PQ/OnXQftYdZkzeG4jcB6D3xWRE3VPxmeUueq7qlParIs8/SNouYVWd0W bHQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=5nGMmMYJc+jbyUIdePUiXQfLRviep4tEd91UyogeC+0=; b=t0wJ5neblXMatrIKdbmzm956Nk0RZadIhJOEpC5ULPh2vkdaMuDkPukTUyLGJBOYz2 /e8ioIUTg2UoCMRvS3588Dj4NcVJTrspGpd7MM/vFMHTfkJCAt5QTQkDUhF6+MyqADod HhmBhFlqnMPEqBtntnINJM7rMBwDp2IWc20no0Gh7UYjmd5cmxqcMF4rT54z0x6dFcRh aMGjChFsce1DeBnBkwV6daNUJcJjBXbC4r8q3h8mGZ2O6L5oqQa/UetPzy4JDBXdYsju s5Z+aPx/HWWS8mXpUoYGc/pvAj5wvSWPFuSI0AyDp/aSsD04XhwCwK2a6W7zcCvySTP6 AcYQ== 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 82si10222012pfa.115.2018.12.09.19.20.59; Sun, 09 Dec 2018 19:21:14 -0800 (PST) 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 S1726389AbeLJDUX (ORCPT + 99 others); Sun, 9 Dec 2018 22:20:23 -0500 Received: from mga18.intel.com ([134.134.136.126]:65338 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbeLJDUX (ORCPT ); Sun, 9 Dec 2018 22:20:23 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Dec 2018 19:20:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,337,1539673200"; d="scan'208";a="106187326" Received: from spandruv-mobl.amr.corp.intel.com ([10.252.164.250]) by fmsmga007.fm.intel.com with ESMTP; 09 Dec 2018 19:20:19 -0800 Message-ID: <0f9d668e8ed77ef17ba029e15b52fa817e49dbdb.camel@linux.intel.com> Subject: Re: [PATCH] HID: intel-ish-hid: fixes incorrect error handling From: Srinivas Pandruvada To: Jiri Kosina , Benjamin Tissoires Cc: bianpan2016@163.com, "open list:HID CORE LAYER" , lkml Date: Sun, 09 Dec 2018 19:20:18 -0800 In-Reply-To: References: <1542847953-127599-1-git-send-email-bianpan2016@163.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-12-09 at 21:45 +0100, Jiri Kosina wrote: > On Fri, 7 Dec 2018, Benjamin Tissoires wrote: > > > > The memory chunk allocated by hid_allocate_device() should be > > > released > > > by hid_destroy_device(), not kfree(). > > > > > > Fixes: 0b28cb4bcb1("HID: intel-ish-hid: ISH HID client driver") > > > Signed-off-by: Pan Bian > > > --- > > > drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c > > > b/drivers/hid/intel-ish-hid/ishtp-hid.c > > > index cd23903..e918d78 100644 > > > --- a/drivers/hid/intel-ish-hid/ishtp-hid.c > > > +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c > > > @@ -222,7 +222,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev, > > > err_hid_device: > > > kfree(hid_data); > > > err_hid_data: > > > - kfree(hid); > > > + hid_destroy_device(hid); > > > > Looks good to me. Srinivas, any comments? > > FWIW: > > Reviewed-by: Benjamin Tissoires > > > > Jiri, do you think we should send this one as 4.20/fixes material > > or > > wait for 4.21? > > Given that this has been around since 4.9, I wouldn't be devastated > if it > lands only in next merge window. So I'd just put it to 4.20/fixes and > wait > for other more serious trigger for sending that to Linus eventually. > Agree. Thanks, Srinivas > Thanks, >