NFC: remove unneeded NULL check
Subsystems (2)
PATCH 1/1 NFC: remove unneeded 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 <[email protected]>
drivers/nfc/pn533.c +0 -3
@@ -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)
Samuel Ortiz
AppliedHi Dan,
Quoted 6 lines · 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 <[email protected]>
Applied to my nfc-next queue, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/