devices/rtdmnet.c : fixed indentation and error handling. stable-1.5 tip
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 09 Oct 2018 09:22:53 +0200
branchstable-1.5
changeset 2727 32c9a2dea9ed
parent 2726 ca80d6dac4c8
devices/rtdmnet.c : fixed indentation and error handling.
devices/rtdmnet.c
--- a/devices/rtdmnet.c	Mon Oct 08 23:16:34 2018 +0200
+++ b/devices/rtdmnet.c	Tue Oct 09 09:22:53 2018 +0200
@@ -243,10 +243,10 @@
        from cobalt thread (i.e. if (cobalt_ppd_get(0) != &cobalt_kernel_ppd))
        we resolve it here in advance */
     dev->rtdm_fd = rtdm_fd_get(dev->socket,0);
-	if (IS_ERR(dev->rtdm_fd)){
+    if (IS_ERR(dev->rtdm_fd)){
         printk(" rtdm_fd_get() = %d!\n", ret);
-		ret = PTR_ERR(dev->rtdm_fd);
-        goto out_err;
+        ret = PTR_ERR(dev->rtdm_fd);
+        goto out_err_rtdm_fd;
     }
 
     printk(KERN_ERR PFX "Binding socket to interface %i (%s).\n",
@@ -260,13 +260,14 @@
                       sizeof(struct sockaddr_ll));
     if (ret < 0) {
         printk(" rtdm_bind() = %d!\n", ret);
-        goto out_err;
+        goto out_err_bind;
     }
 
     return 0;
 
-out_err:
+out_err_bind:
     rtdm_fd_put(dev->rtdm_fd);
+out_err_rtdm_fd:
     rtdm_close(dev->socket);
     dev->socket = -1;
     return ret;
@@ -375,10 +376,10 @@
     msg.msg_iov     = &iov;
     msg.msg_iovlen  = 1;
 
-	if (rtdm_in_rt_context())
+    if (rtdm_in_rt_context())
         /* HACK : call fd ops directly as in rtdm's fd.c */
         ret = dev->rtdm_fd->ops->sendmsg_rt(dev->rtdm_fd, &msg, 0);
-	else
+    else
         ret = nrt_rtdm_sendmsg(dev->socket, &msg);
 
     return ret == len ? NETDEV_TX_OK : NETDEV_TX_BUSY;