From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] dhcp: do not call net_unregister if net_udp_new failed
Date: Mon, 14 Jun 2010 09:43:44 +0200 [thread overview]
Message-ID: <1276501424-3224-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1276501424-3224-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
net/dhcp.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/dhcp.c b/net/dhcp.c
index 54c5179..0771964 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -447,13 +447,13 @@ static int do_dhcp(struct command *cmdtp, int argc, char *argv[])
ret = net_udp_bind(dhcp_con, PORT_BOOTPC);
if (ret)
- goto out;
+ goto out1;
net_set_ip(0);
ret = bootp_request(); /* Basically same as BOOTP */
if (ret)
- goto out;
+ goto out1;
while (dhcp_state != BOUND) {
if (ctrlc())
@@ -464,13 +464,13 @@ static int do_dhcp(struct command *cmdtp, int argc, char *argv[])
printf("T ");
ret = bootp_request();
if (ret)
- goto out;
+ goto out1;
}
}
-out:
+out1:
net_unregister(dhcp_con);
-
+out:
if (ret)
printf("dhcp failed: %s\n", strerror(-ret));
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2010-06-14 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-14 7:43 Some (new-) network stack fixes Sascha Hauer
2010-06-14 7:43 ` [PATCH 1/3] tftp: do not forget to close the file in error case Sascha Hauer
2010-06-14 7:43 ` [PATCH 2/3] parameter: set p->value to NULL to avoid freeing it again Sascha Hauer
2010-06-14 7:43 ` Sascha Hauer [this message]
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=1276501424-3224-4-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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