Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfc: st-nci: Remove unnecessary variable

The variable r is defined at the beginning and initialized
to 0 until the function returns r, and the variable r is
not reassigned.Therefore, we do not need to define the
variable r, just return 0 directly at the end of the function.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

wengjianfeng and committed by
David S. Miller
796c9015 c85b3bb7

+1 -2
+1 -2
drivers/nfc/st-nci/se.c
··· 276 276 u8 event, 277 277 struct sk_buff *skb) 278 278 { 279 - int r = 0; 280 279 struct st_nci_info *info = nci_get_drvdata(ndev); 281 280 282 281 pr_debug("apdu reader gate event: %x\n", event); ··· 297 298 } 298 299 299 300 kfree_skb(skb); 300 - return r; 301 + return 0; 301 302 } 302 303 303 304 /*