Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3b65713 authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds
Browse files

[PATCH] fs/eventpoll: error handling micro-cleanup



While reviewing the 'may be used uninitialized' bogus gcc warnings, I
noticed that an error code assignment was only needed if an error had
actually occured.

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e1ca66d1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -720,9 +720,10 @@ static int ep_getfd(int *efd, struct inode **einode, struct file **efile,

	/* Allocates an inode from the eventpoll file system */
	inode = ep_eventpoll_inode();
	if (IS_ERR(inode)) {
		error = PTR_ERR(inode);
	if (IS_ERR(inode))
		goto eexit_2;
	}

	/* Allocates a free descriptor to plug the file onto */
	error = get_unused_fd();