diff options
Diffstat (limited to 'net/nfc/netlink.c')
-rw-r--r-- | net/nfc/netlink.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 44989fc8cddf..be387e6219a0 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c | |||
@@ -102,7 +102,8 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target, | |||
102 | goto nla_put_failure; | 102 | goto nla_put_failure; |
103 | } | 103 | } |
104 | 104 | ||
105 | return genlmsg_end(msg, hdr); | 105 | genlmsg_end(msg, hdr); |
106 | return 0; | ||
106 | 107 | ||
107 | nla_put_failure: | 108 | nla_put_failure: |
108 | genlmsg_cancel(msg, hdr); | 109 | genlmsg_cancel(msg, hdr); |
@@ -518,7 +519,8 @@ static int nfc_genl_send_device(struct sk_buff *msg, struct nfc_dev *dev, | |||
518 | nla_put_u8(msg, NFC_ATTR_RF_MODE, dev->rf_mode)) | 519 | nla_put_u8(msg, NFC_ATTR_RF_MODE, dev->rf_mode)) |
519 | goto nla_put_failure; | 520 | goto nla_put_failure; |
520 | 521 | ||
521 | return genlmsg_end(msg, hdr); | 522 | genlmsg_end(msg, hdr); |
523 | return 0; | ||
522 | 524 | ||
523 | nla_put_failure: | 525 | nla_put_failure: |
524 | genlmsg_cancel(msg, hdr); | 526 | genlmsg_cancel(msg, hdr); |
@@ -908,7 +910,8 @@ static int nfc_genl_send_params(struct sk_buff *msg, | |||
908 | nla_put_u16(msg, NFC_ATTR_LLC_PARAM_MIUX, be16_to_cpu(local->miux))) | 910 | nla_put_u16(msg, NFC_ATTR_LLC_PARAM_MIUX, be16_to_cpu(local->miux))) |
909 | goto nla_put_failure; | 911 | goto nla_put_failure; |
910 | 912 | ||
911 | return genlmsg_end(msg, hdr); | 913 | genlmsg_end(msg, hdr); |
914 | return 0; | ||
912 | 915 | ||
913 | nla_put_failure: | 916 | nla_put_failure: |
914 | 917 | ||
@@ -1247,8 +1250,7 @@ static int nfc_genl_send_se(struct sk_buff *msg, struct nfc_dev *dev, | |||
1247 | nla_put_u8(msg, NFC_ATTR_SE_TYPE, se->type)) | 1250 | nla_put_u8(msg, NFC_ATTR_SE_TYPE, se->type)) |
1248 | goto nla_put_failure; | 1251 | goto nla_put_failure; |
1249 | 1252 | ||
1250 | if (genlmsg_end(msg, hdr) < 0) | 1253 | genlmsg_end(msg, hdr); |
1251 | goto nla_put_failure; | ||
1252 | } | 1254 | } |
1253 | 1255 | ||
1254 | return 0; | 1256 | return 0; |