aboutsummaryrefslogtreecommitdiffstats
path: root/net/dcb/dcbnl.c
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-07-17 01:32:39 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-17 19:02:29 -0400
commitc2659479f7865fb538493089bce3dd3d2abf90b0 (patch)
treebe1dbef19fbeb971a8a6445536d80f1a163fe465 /net/dcb/dcbnl.c
parent9cc63db5e1f2f1c387f1a4c9983cf1364fe4ef95 (diff)
Update setapp/getapp prototypes in dcbnl_rtnl_ops to return int instead of u8
v2: fixed issue with checking return of dcbnl_rtnl_ops->getapp() Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dcb/dcbnl.c')
-rw-r--r--net/dcb/dcbnl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index f8b98d89c285..c34af7a1d2d4 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -471,7 +471,11 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlmsghdr *nlh,
471 id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]); 471 id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]);
472 472
473 if (netdev->dcbnl_ops->getapp) { 473 if (netdev->dcbnl_ops->getapp) {
474 up = netdev->dcbnl_ops->getapp(netdev, idtype, id); 474 ret = netdev->dcbnl_ops->getapp(netdev, idtype, id);
475 if (ret < 0)
476 return ret;
477 else
478 up = ret;
475 } else { 479 } else {
476 struct dcb_app app = { 480 struct dcb_app app = {
477 .selector = idtype, 481 .selector = idtype,
@@ -538,6 +542,8 @@ static int dcbnl_setapp(struct net_device *netdev, struct nlmsghdr *nlh,
538 542
539 if (netdev->dcbnl_ops->setapp) { 543 if (netdev->dcbnl_ops->setapp) {
540 ret = netdev->dcbnl_ops->setapp(netdev, idtype, id, up); 544 ret = netdev->dcbnl_ops->setapp(netdev, idtype, id, up);
545 if (ret < 0)
546 return ret;
541 } else { 547 } else {
542 struct dcb_app app; 548 struct dcb_app app;
543 app.selector = idtype; 549 app.selector = idtype;