From: Andy Shevchenko Date: Wed, 22 Mar 2017 19:20:58 +0000 (+0200) Subject: NFC: netlink: Use error code from nfc_activate_target() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3267183c3d1a6612c00961d7334413f9976c751a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NFC: netlink: Use error code from nfc_activate_target() It looks like a typo to assign a return code to a variable which is not used. Found due to a compiler warning: net/nfc/netlink.c: In function ‘nfc_genl_activate_target’: net/nfc/netlink.c:903:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^~ Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz --- diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 4c95319dc22b..23a6e01f35ed 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c @@ -922,7 +922,7 @@ static int nfc_genl_activate_target(struct sk_buff *skb, struct genl_info *info) rc = nfc_activate_target(dev, target_idx, protocol); nfc_put_device(dev); - return 0; + return rc; } static int nfc_genl_dep_link_up(struct sk_buff *skb, struct genl_info *info)