From: Dan Carpenter Date: Mon, 7 May 2012 10:31:18 +0000 (+0200) Subject: NFC: Remove unneeded pn533 dev NULL check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0f909361062d42b0ff7c6522e2347b56a0bf43cc;p=openwrt%2Fstaging%2Fblogic.git NFC: Remove unneeded pn533 dev NULL check 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 Signed-off-by: John W. Linville --- diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index 766e0bb5ae53..19110f0eb15f 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)