linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: user-mode-linux-devel@lists.sourceforge.net,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>
Cc: user-mode-linux-user@lists.sourceforge.net,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/9] um/drivers/vector_user: Adjust an error message in user_init_socket_fds()
Date: Sun, 11 Mar 2018 16:18:08 +0100	[thread overview]
Message-ID: <0ba0e9fa-9987-055a-c065-3f36a06d045d@users.sourceforge.net> (raw)
In-Reply-To: <e21083ff-0ba7-42ad-e3f0-d84da9c93208@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 11 Mar 2018 13:53:08 +0100

* Adjust an error message at the end of this function.

* Delete the local variable "err" which became unnecessary
  with this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/um/drivers/vector_user.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/um/drivers/vector_user.c b/arch/um/drivers/vector_user.c
index 037cd85ee424..9cc4651990e3 100644
--- a/arch/um/drivers/vector_user.c
+++ b/arch/um/drivers/vector_user.c
@@ -305,7 +305,6 @@ bool uml_tap_enable_vnet_headers(int fd)
 
 static struct vector_fds *user_init_socket_fds(struct arglist *ifspec, int id)
 {
-	int err = -ENOMEM;
 	int fd = -1, gairet;
 	struct addrinfo srchints;
 	struct addrinfo dsthints;
@@ -419,7 +418,7 @@ static struct vector_fds *user_init_socket_fds(struct arglist *ifspec, int id)
 cleanup:
 	if (gairesult != NULL)
 		freeaddrinfo(gairesult);
-	printk(UM_KERN_ERR "user_init_socket: init failed, error %d", err);
+
 	if (fd >= 0)
 		os_close_file(fd);
 	if (result != NULL) {
@@ -427,6 +426,8 @@ static struct vector_fds *user_init_socket_fds(struct arglist *ifspec, int id)
 			kfree(result->remote_addr);
 		kfree(result);
 	}
+
+	printk(UM_KERN_ERR "%s: init failed: %d", __func__, -ENOMEM);
 	return NULL;
 }
 
-- 
2.16.2



  parent reply	other threads:[~2018-03-11 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11 15:15 [PATCH 0/9] UML vector network driver: Adjustments for three function implementations SF Markus Elfring
2018-03-11 15:16 ` [PATCH 1/9] um/drivers/vector_user: Delete unnecessary code in user_init_raw_fds() SF Markus Elfring
2018-03-11 18:08   ` Anton Ivanov
2018-03-11 15:17 ` [PATCH 2/9] um/drivers/vector_user: Less checks in user_init_raw_fds() after error detection SF Markus Elfring
2018-03-13  7:08   ` [2/9] " SF Markus Elfring
2018-03-11 15:18 ` SF Markus Elfring [this message]
2018-03-11 15:19 ` [PATCH 4/9] um/drivers/vector_user: Delete an unnecessary check before kfree() in user_init_socket_fds() SF Markus Elfring
2018-03-11 15:20 ` [PATCH 5/9] um/drivers/vector_user: Delete two unnecessary checks before freeaddrinfo() " SF Markus Elfring
2018-03-11 15:21 ` [PATCH 6/9] um/drivers/vector_user: Less checks in user_init_socket_fds() after error detection SF Markus Elfring
2018-03-11 15:22 ` [PATCH 7/9] um/drivers/vector_user: Adjust an error message in user_init_tap_fds() SF Markus Elfring
2018-03-11 15:23 ` [PATCH 8/9] um/drivers/vector_user: Less checks in user_init_tap_fds() after error detection SF Markus Elfring
2018-03-11 15:24 ` [PATCH 9/9] um/drivers/vector_user: Delete an unnecessary variable initialisation in user_init_tap_fds() SF Markus Elfring
2018-03-29 19:51 ` [0/9] UML vector network driver: Adjustments for three function implementations SF Markus Elfring
2018-03-29 20:21   ` [uml-devel] " Anton Ivanov

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=0ba0e9fa-9987-055a-c065-3f36a06d045d@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=jdike@addtoit.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).