Return-path: Received: from mga14.intel.com ([143.182.124.37]:26259 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756141Ab2EGKcV (ORCPT ); Mon, 7 May 2012 06:32:21 -0400 From: Samuel Ortiz To: "John W. Linville" Cc: Lauro Ramos Venancio , Aloisio Almeida Jr , Ilan Elias , linux-wireless@vger.kernel.org, Dan Carpenter , Samuel Ortiz Subject: [PATCH 07/20] NFC: Remove unneeded pn533 dev NULL check Date: Mon, 7 May 2012 12:31:18 +0200 Message-Id: <1336386691-24840-8-git-send-email-sameo@linux.intel.com> (sfid-20120507_123225_297880_3B3D2F1A) In-Reply-To: <1336386691-24840-1-git-send-email-sameo@linux.intel.com> References: <1336386691-24840-1-git-send-email-sameo@linux.intel.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Dan Carpenter container_of() works by subtracting the offset of the member. The math can't really return a zero here. Sometimes people check it when they actually meant to check something else but in this case we can just remove the check. Signed-off-by: Dan Carpenter Signed-off-by: Samuel Ortiz --- drivers/nfc/pn533.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index 766e0bb..19110f0 100644 --- a/drivers/nfc/pn533.c +++ b/drivers/nfc/pn533.c @@ -394,9 +394,6 @@ static void pn533_wq_cmd_complete(struct work_struct *work) struct pn533_frame *in_frame; int rc; - if (dev == NULL) - return; - in_frame = dev->wq_in_frame; if (dev->wq_in_error) -- 1.7.9.1