All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [RFC] [PATCH] s390/net/claw: don't ignore return value of find_link
Date: Sun, 11 May 2008 21:57:40 +0200	[thread overview]
Message-ID: <20080511195736.GF19058@joi> (raw)

find_link checked some conditions but then ignored it - fix it.
return negative error for consistency with the rest of kernel

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
please check if it's correct patch
---
 drivers/s390/net/claw.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -1722,18 +1722,18 @@ find_link(struct net_device *dev, char *host_name, char *ws_name )
 		case  PACKING_ASK:
 			if ((memcmp(WS_APPL_NAME_PACKED, host_name, 8)!=0) ||
 			    (memcmp(WS_APPL_NAME_PACKED, ws_name, 8)!=0 ))
-        	             rc = EINVAL;
+				rc = -EINVAL;
 			break;
 		case  DO_PACKED:
 		case  PACK_SEND:
 			if ((memcmp(WS_APPL_NAME_IP_NAME, host_name, 8)!=0) ||
 			    (memcmp(WS_APPL_NAME_IP_NAME, ws_name, 8)!=0 ))
-        	        	rc = EINVAL;
+				rc = -EINVAL;
 			break;
 		default:
 	       		if ((memcmp(HOST_APPL_NAME, host_name, 8)!=0) ||
 		    	    (memcmp(p_env->api_type , ws_name, 8)!=0))
-        	        	rc = EINVAL;
+				rc = -EINVAL;
 			break;
 	}
 
@@ -1741,7 +1741,7 @@ find_link(struct net_device *dev, char *host_name, char *ws_name )
         printk(KERN_INFO "%s:%s Exit on line %d\n",
 		dev->name,__func__,__LINE__);
 #endif
-        return 0;
+	return rc;
 }    /*    end of find_link    */
 
 /*-------------------------------------------------------------------*
-- 

                 reply	other threads:[~2008-05-11 19:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080511195736.GF19058@joi \
    --to=marcin.slusarz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.