Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2927246imu; Sun, 9 Dec 2018 12:47:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDiA7S8Ffyxnm0yVO866HEtDQr33yK+7ZawBUPQYfhrwYkR/f/k453svXxwG3bZtQIyVA3 X-Received: by 2002:a62:1c96:: with SMTP id c144mr9854071pfc.129.1544388454195; Sun, 09 Dec 2018 12:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544388454; cv=none; d=google.com; s=arc-20160816; b=Tj9NR2WzmCb736uKfb0016kZKjXg1HCsYP068wZmpkzKCUUkPAwrK9gHRiiC+qEyah fXL4JYnn9mBvQj2NkwXDjWF/Oj0/VxqXnTHaouA8nIhwPt28bmwKWxJbps7ipMt2dqUI 91380L+iJqpEob5d8xehFBmpjm3H+SXVV/rxzN5QNbC4vXfkpKfmbcWqAnpDHdW/FXTP oZxD499MTLTvhnycjqksLDC0iAlOj3XpKoa6hW7GmIOWs8Mk/Fz5x19LVDDPkwCVB12f w+AKizT8/kDpDuCTm5l0XbBZ7ZS8U8c1OAYAY5COxwhHep/aHNWn729rVW3nQyld53OR 9/Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=XgpYYMsJqq1USRI1D7WhoKBoR2WFzq7HhWm1wtZHVzk=; b=pPLb0ndoaDg6X4ZZ/P0qTUVGHCZ2ez7vKacvhtrrJZJ1Rtn46jVkFYM07gmUsCKqSr 5sPY8ENdhRjLqS9h9SmaarOJv1ruHyZY66OYVN5xtxTsOdfP9wAwDO/ImalnyFQLvc1N YnkF4m2iY+5tME356g2P84raqZalD8rLYjh2Eon/yAv3w6KHKJkEZUt8heuyxPJJEjhX GE7+c+sh8NkUrM8TZOSQUTbMxQaRfzeD2xrs24JadT/vvTyYZs/ZD8okQO63F7seY5RJ a4E+9+HhS3r8oDQ3/BhHGKOqLL1qcg9LR+OKFP9hxyOW8Lxl3ZjcYsUsN89z7XnMFqu7 JIoA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si8564586plk.260.2018.12.09.12.47.18; Sun, 09 Dec 2018 12:47:34 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbeLIUpm (ORCPT + 99 others); Sun, 9 Dec 2018 15:45:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:41900 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726219AbeLIUpl (ORCPT ); Sun, 9 Dec 2018 15:45:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1A7A4AE86; Sun, 9 Dec 2018 20:45:40 +0000 (UTC) Date: Sun, 9 Dec 2018 21:45:39 +0100 (CET) From: Jiri Kosina To: Benjamin Tissoires cc: bianpan2016@163.com, Srinivas Pandruvada , "open list:HID CORE LAYER" , lkml Subject: Re: [PATCH] HID: intel-ish-hid: fixes incorrect error handling In-Reply-To: Message-ID: References: <1542847953-127599-1-git-send-email-bianpan2016@163.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, -- Jiri Kosina SUSE Labs