NFC: netlink: Use error code from nfc_activate_target()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 22 Mar 2017 19:20:58 +0000 (21:20 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 5 Apr 2017 08:15:17 +0000 (10:15 +0200)
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/netlink.c

index 4c95319dc22b6fe4ec999da8248f028318cea628..23a6e01f35edd34676ec3c345fa939b491705eeb 100644 (file)
@@ -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)