From patchwork Tue Dec 4 15:27:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 1838801 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EAE9EDF230 for ; Tue, 4 Dec 2012 15:29:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752975Ab2LDP3e (ORCPT ); Tue, 4 Dec 2012 10:29:34 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:42161 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753632Ab2LDP2c (ORCPT ); Tue, 4 Dec 2012 10:28:32 -0500 Received: by mail-wi0-f174.google.com with SMTP id hm9so940747wib.1 for ; Tue, 04 Dec 2012 07:28:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=G39eWru9xQ64ZjIDdqCZdLd4HosZ4ErZv8PFdFcMVEs=; b=aYPspl0UYln15gI8A5lZ+25He/zA1HghyavnHpL7rC4mR7EoBCGTk8B5ojLnTI4jLk iWbc22qVDxui1Q33EvTLsnf8EY/JZx8e8gOMNgZXe31DV03mJnnhJHCu/rYAJgmOkcqB AbEsJWpxDoVzTPyd3Y5x+TgjCkt8I33Cnm0WGkj9ajRfnpTSLhyHbUw1EHyEUuKCS54L ktc/vyxyn9GxCOiAXKMXODHHt76dry+2ttvihEVEmzyAzvvg9gGkFs85qwkueWSm3IFm OAPI7lUeLqiU6dluZ2FeFgBBPCYBgJOWkSRTPfoh1DNYtlFQP/fo3ipnDcDu8/JaDD7e mO5g== Received: by 10.180.93.40 with SMTP id cr8mr5114137wib.15.1354634911646; Tue, 04 Dec 2012 07:28:31 -0800 (PST) Received: from localhost.localdomain.com (lan31-8-82-247-176-67.fbx.proxad.net. [82.247.176.67]) by mx.google.com with ESMTPS id p3sm15443846wic.8.2012.12.04.07.28.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Dec 2012 07:28:30 -0800 (PST) From: Benjamin Tissoires To: Benjamin Tissoires , Jiri Kosina , Jean Delvare , linux-input@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/14] HID: i2c-hid: remove unneeded test in i2c_hid_remove Date: Tue, 4 Dec 2012 16:27:52 +0100 Message-Id: <1354634875-5182-12-git-send-email-benjamin.tissoires@gmail.com> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1354634875-5182-1-git-send-email-benjamin.tissoires@gmail.com> References: <1354634875-5182-1-git-send-email-benjamin.tissoires@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org ihid can not be null, so there are no reasons to test it. Signed-off-by: Benjamin Tissoires --- drivers/hid/i2c-hid/i2c-hid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 4e3f80b..2b49929 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -890,9 +890,6 @@ static int __devexit i2c_hid_remove(struct i2c_client *client) struct i2c_hid *ihid = i2c_get_clientdata(client); struct hid_device *hid; - if (WARN_ON(!ihid)) - return -1; - hid = ihid->hid; hid_destroy_device(hid);