diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-10-02 02:01:15 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-10-03 14:16:11 -0400 |
commit | 6e14eab90a933c2e936639be390bf231a377b44a (patch) | |
tree | 75af24e220d7b5104e24025a84c069fd183304bf /drivers/target | |
parent | 7c9e7a6fe11c8dc5b3b9d0e889dde73347247584 (diff) |
target/user: Fix up smatch warnings in tcmu_netlink_event
This patch fixes up the following unused return smatch warnings:
drivers/target/target_core_user.c:778 tcmu_netlink_event warn: unused return: ret = nla_put_string()
drivers/target/target_core_user.c:780 tcmu_netlink_event warn: unused `return: ret = nla_put_u32()
(Fix up missing semicolon: grover)
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_user.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 6608ecf94570..ac37ce6be15c 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c | |||
@@ -763,27 +763,27 @@ static int tcmu_netlink_event(enum tcmu_genl_cmd cmd, const char *name, int mino | |||
763 | { | 763 | { |
764 | struct sk_buff *skb; | 764 | struct sk_buff *skb; |
765 | void *msg_header; | 765 | void *msg_header; |
766 | int ret; | 766 | int ret = -ENOMEM; |
767 | 767 | ||
768 | skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); | 768 | skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); |
769 | if (!skb) | 769 | if (!skb) |
770 | return -ENOMEM; | 770 | return ret; |
771 | 771 | ||
772 | msg_header = genlmsg_put(skb, 0, 0, &tcmu_genl_family, 0, cmd); | 772 | msg_header = genlmsg_put(skb, 0, 0, &tcmu_genl_family, 0, cmd); |
773 | if (!msg_header) { | 773 | if (!msg_header) |
774 | nlmsg_free(skb); | 774 | goto free_skb; |
775 | return -ENOMEM; | ||
776 | } | ||
777 | 775 | ||
778 | ret = nla_put_string(skb, TCMU_ATTR_DEVICE, name); | 776 | ret = nla_put_string(skb, TCMU_ATTR_DEVICE, name); |
777 | if (ret < 0) | ||
778 | goto free_skb; | ||
779 | 779 | ||
780 | ret = nla_put_u32(skb, TCMU_ATTR_MINOR, minor); | 780 | ret = nla_put_u32(skb, TCMU_ATTR_MINOR, minor); |
781 | if (ret < 0) | ||
782 | goto free_skb; | ||
781 | 783 | ||
782 | ret = genlmsg_end(skb, msg_header); | 784 | ret = genlmsg_end(skb, msg_header); |
783 | if (ret < 0) { | 785 | if (ret < 0) |
784 | nlmsg_free(skb); | 786 | goto free_skb; |
785 | return ret; | ||
786 | } | ||
787 | 787 | ||
788 | ret = genlmsg_multicast(&tcmu_genl_family, skb, 0, | 788 | ret = genlmsg_multicast(&tcmu_genl_family, skb, 0, |
789 | TCMU_MCGRP_CONFIG, GFP_KERNEL); | 789 | TCMU_MCGRP_CONFIG, GFP_KERNEL); |
@@ -793,6 +793,9 @@ static int tcmu_netlink_event(enum tcmu_genl_cmd cmd, const char *name, int mino | |||
793 | ret = 0; | 793 | ret = 0; |
794 | 794 | ||
795 | return ret; | 795 | return ret; |
796 | free_skb: | ||
797 | nlmsg_free(skb); | ||
798 | return ret; | ||
796 | } | 799 | } |
797 | 800 | ||
798 | static int tcmu_configure_device(struct se_device *dev) | 801 | static int tcmu_configure_device(struct se_device *dev) |