]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[S390] monwriter: fix return code handling
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 23 May 2011 08:24:27 +0000 (10:24 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 23 May 2011 08:24:29 +0000 (10:24 +0200)
Fix return code handling within monwrite_new_hdr(). Return code handling
is everwhere implemented, the return code of the diagnose function was
just not passed.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/monwriter.c

index e0702d3ea33ba669223b5237f3a60acba8cfa35e..4600aa10a1c6c5824f36168fb83b414d2e4e915b 100644 (file)
@@ -97,7 +97,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
 {
        struct monwrite_hdr *monhdr = &monpriv->hdr;
        struct mon_buf *monbuf;
-       int rc;
+       int rc = 0;
 
        if (monhdr->datalen > MONWRITE_MAX_DATALEN ||
            monhdr->mon_function > MONWRITE_START_CONFIG ||
@@ -135,7 +135,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
                        mon_buf_count++;
        }
        monpriv->current_buf = monbuf;
-       return 0;
+       return rc;
 }
 
 static int monwrite_new_data(struct mon_private *monpriv)