From patchwork Thu Jul 14 05:07:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 974342 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6E581nD023105 for ; Thu, 14 Jul 2011 05:08:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753827Ab1GNFIA (ORCPT ); Thu, 14 Jul 2011 01:08:00 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:47794 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965Ab1GNFH7 (ORCPT ); Thu, 14 Jul 2011 01:07:59 -0400 Received: by gxk21 with SMTP id 21so2704748gxk.19 for ; Wed, 13 Jul 2011 22:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=E85TaNFrF5a1Yl1Fb14O1On175aqqygcaOihuKGpL/M=; b=Y0/QN1Skok5xaaYUI38FDW1Q3LG7itETw1FCfqQXWM2/KcNKqu0W5yqq6lmupPTeLU Ldr9HZEhrIUMuRyecNSGjwhg0PBaXIO1PEN9OgO4alGH0QMEJdPSL1uT7TkwOGnef2I2 quBPG9Gz5wtn/jscXhYmLI75dNqOC2UqS5YmA= Received: by 10.236.180.34 with SMTP id i22mr536889yhm.28.1310620079085; Wed, 13 Jul 2011 22:07:59 -0700 (PDT) Received: from [218.172.238.220] (218-172-238-220.dynamic.hinet.net [218.172.238.220]) by mx.google.com with ESMTPS id c69sm2220789yhm.57.2011.07.13.22.07.56 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jul 2011 22:07:58 -0700 (PDT) Subject: [PATCH] HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Jiri Kosina , Dmitry Torokhov , Sergei Kolzun , linux-input@vger.kernel.org Date: Thu, 14 Jul 2011 13:07:51 +0800 Message-ID: <1310620071.2721.3.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Jul 2011 05:08:01 +0000 (UTC) hid_hw_stop() must be called in ax_probe() error path if hid_hw_start() was successful. Signed-off-by: Axel Lin --- drivers/hid/hid-axff.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c index b455428..1215141 100644 --- a/drivers/hid/hid-axff.c +++ b/drivers/hid/hid-axff.c @@ -154,6 +154,7 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) error = hid_hw_open(hdev); if (error) { dev_err(&hdev->dev, "hw open failed\n"); + hid_hw_stop(hdev); return error; }