mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net/niu: Fix compile warnings
Date: Mon, 28 Jul 2008 16:24:19 +0200	[thread overview]
Message-ID: <s5hr69eqe7g.wl%tiwai@suse.de> (raw)

Fix the wrong return value from niu_ethflow_to_class().

  drivers/net/niu.c: In function 'niu_get_hash_opts':
  drivers/net/niu.c:6481: warning: 'class' may be used uninitialized in this function
  drivers/net/niu.c: In function 'niu_set_hash_opts':
  drivers/net/niu.c:6501: warning: 'class' may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 8ee7d7b..e4765b7 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -6417,7 +6417,7 @@ static int niu_ethflow_to_class(int flow_type, u64 *class)
 		*class = CLASS_CODE_SCTP_IPV6;
 		break;
 	default:
-		return -1;
+		return 0;
 	}
 
 	return 1;

                 reply	other threads:[~2008-07-28 14:24 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=s5hr69eqe7g.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®