From patchwork Thu Oct 25 14:13:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 1644291 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CB8763FC36 for ; Thu, 25 Oct 2012 14:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758397Ab2JYOLa (ORCPT ); Thu, 25 Oct 2012 10:11:30 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:53717 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758273Ab2JYOLT (ORCPT ); Thu, 25 Oct 2012 10:11:19 -0400 Received: from bob.linux.org.uk (earthlight.etchedpixels.co.uk [81.2.110.250]) by lxorguk.ukuu.org.uk (8.14.5/8.14.1) with ESMTP id q9PEhFvx005880; Thu, 25 Oct 2012 15:43:20 +0100 From: Alan Cox Subject: [PATCH RESEND] sensor-hub: Remove pointless NULL check To: linux-input@vger.kernel.org, srinivas.pandruvada@linux.intel.com Date: Thu, 25 Oct 2012 15:13:09 +0100 Message-ID: <20121025141255.30436.54078.stgit@bob.linux.org.uk> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Alan Cox report cannot be NULL, fortunately as we use it before we check ! Signed-off-by: Alan Cox --- drivers/hid/hid-sensor-hub.c | 4 ---- 1 file changed, 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index d9d73e9..4ff2497 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -437,9 +437,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev, ptr = raw_data; ptr++; /*Skip report id*/ - if (!report) - goto err_report; - spin_lock_irqsave(&pdata->lock, flags); for (i = 0; i < report->maxfield; ++i) { @@ -485,7 +482,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev, callback->pdev); spin_unlock_irqrestore(&pdata->lock, flags); -err_report: return 1; }