mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[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: Jeff Garzik <[email protected]> Cc: Davide Libenzi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e1ca66d1b9
commit
c3b6571384
1 changed files with 3 additions and 2 deletions
|
|
@ -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();
|
||||
error = PTR_ERR(inode);
|
||||
if (IS_ERR(inode))
|
||||
if (IS_ERR(inode)) {
|
||||
error = PTR_ERR(inode);
|
||||
goto eexit_2;
|
||||
}
|
||||
|
||||
/* Allocates a free descriptor to plug the file onto */
|
||||
error = get_unused_fd();
|
||||
|
|
|
|||
Loading…
Reference in a new issue