devlink: use nla_put_failure goto label instead of out
authorJiri Pirko <jiri@mellanox.com>
Thu, 9 Feb 2017 14:54:35 +0000 (15:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2017 19:43:00 +0000 (14:43 -0500)
Be aligned with the rest of the code and use label named nla_put_failure.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c

index f361924..7f88cc8 100644 (file)
@@ -1408,29 +1408,29 @@ static int devlink_nl_eswitch_fill(struct sk_buff *msg, struct devlink *devlink,
 
        err = devlink_nl_put_handle(msg, devlink);
        if (err)
-               goto out;
+               goto nla_put_failure;
 
        err = ops->eswitch_mode_get(devlink, &mode);
        if (err)
-               goto out;
+               goto nla_put_failure;
        err = nla_put_u16(msg, DEVLINK_ATTR_ESWITCH_MODE, mode);
        if (err)
-               goto out;
+               goto nla_put_failure;
 
        if (ops->eswitch_inline_mode_get) {
                err = ops->eswitch_inline_mode_get(devlink, &inline_mode);
                if (err)
-                       goto out;
+                       goto nla_put_failure;
                err = nla_put_u8(msg, DEVLINK_ATTR_ESWITCH_INLINE_MODE,
                                 inline_mode);
                if (err)
-                       goto out;
+                       goto nla_put_failure;
        }
 
        genlmsg_end(msg, hdr);
        return 0;
 
-out:
+nla_put_failure:
        genlmsg_cancel(msg, hdr);
        return err;
 }