From patchwork Mon Aug 26 06:00:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2849394 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2A8E29F9CC for ; Mon, 26 Aug 2013 06:00:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D3862011C for ; Mon, 26 Aug 2013 06:00:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F35EF20150 for ; Mon, 26 Aug 2013 06:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755973Ab3HZGAR (ORCPT ); Mon, 26 Aug 2013 02:00:17 -0400 Received: from mail-bk0-f43.google.com ([209.85.214.43]:49978 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755334Ab3HZGAO (ORCPT ); Mon, 26 Aug 2013 02:00:14 -0400 Received: by mail-bk0-f43.google.com with SMTP id mz13so922389bkb.16 for ; Sun, 25 Aug 2013 23:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=0eNZZdJQ407mHtMotptcNosAEYCDksqFB7iimxntUC4=; b=IHo2rUw9++Pv+DS2pecnNnIaG+DZS4Tmw9A/mogaL8Jnnm429pJa3STgvHGZxvJ1kz PhaoqLgzBRPMXVT6Z3eXxqcPHDL+4ikQ6RnBGR5M7u2Un3kU5fMSxM948AqI68yT+PRu VCjF2odFzGIbEwmJFMUnewhbP5k9qjUHmhi79okIV1TF9pMsL+sET/Bf4nJu1eZI4x0X FC6UDkUIB+vP2G5nJkkVhFlxCk7brBm6PMQuJlQ8INKxN7FNKnZPV7MTULc88l1NzIfm cNDTvwe+xgIztEbskAN964HyKTAdV03M/oc/WNoxDY/pI6LsKODQmft4T9rqi0GCvYYb V9yQ== MIME-Version: 1.0 X-Received: by 10.204.224.142 with SMTP id io14mr425172bkb.27.1377496813056; Sun, 25 Aug 2013 23:00:13 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Sun, 25 Aug 2013 23:00:12 -0700 (PDT) Date: Mon, 26 Aug 2013 14:00:12 +0800 Message-ID: Subject: [PATCH v2] Input: cyttsp4 - remove useless NULL test from cyttsp4_watchdog_timer() From: Wei Yongjun To: javier@dowhile0.org, dmitry.torokhov@gmail.com Cc: yongjun_wei@trendmicro.com.cn, linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Remove useless NULL test from cyttsp4_watchdog_timer(). Signed-off-by: Wei Yongjun Acked-by: Ferruh Yigit --- v1 -> v2: remove NULL test instead. (was: Input: cyttsp4 - fix potential NULL pointer dereference in cyttsp4_watchdog_timer()) --- drivers/input/touchscreen/cyttsp4_core.c | 3 --- 1 file changed, 3 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/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index edcf799..22719d0 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -1246,9 +1246,6 @@ static void cyttsp4_watchdog_timer(unsigned long handle) dev_vdbg(cd->dev, "%s: Watchdog timer triggered\n", __func__); - if (!cd) - return; - if (!work_pending(&cd->watchdog_work)) schedule_work(&cd->watchdog_work);