Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752305AbcLEJOK (ORCPT ); Mon, 5 Dec 2016 04:14:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:36336 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbcLEJOC (ORCPT ); Mon, 5 Dec 2016 04:14:02 -0500 Message-ID: <1480928863.2206.1.camel@suse.com> Subject: Re: [PATCH 1/1] input: usbhid: fix improper check From: Oliver Neukum To: Pan Bian Cc: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-usb@vger.kernel.org, Pan Bian , linux-kernel@vger.kernel.org Date: Mon, 05 Dec 2016 10:07:43 +0100 In-Reply-To: <1480828209-4131-1-git-send-email-bianpan201603@163.com> References: <1480828209-4131-1-git-send-email-bianpan201603@163.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 343 Lines: 12 On Sun, 2016-12-04 at 13:10 +0800, Pan Bian wrote: > From: Pan Bian > > Function hid_post_reset() returns 0 on success, or 1 on failures. It seems like hid_post_reset() is buggy in not returning a proper error code in the failure case. So your diagnosis is right, but the fix is at the wrong place. Regards Oliver