diff options
-rw-r--r-- | fs/eventpoll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 8d544334bcd2..557d5b614fae 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -720,9 +720,10 @@ static int ep_getfd(int *efd, struct inode **einode, struct file **efile, | |||
720 | 720 | ||
721 | /* Allocates an inode from the eventpoll file system */ | 721 | /* Allocates an inode from the eventpoll file system */ |
722 | inode = ep_eventpoll_inode(); | 722 | inode = ep_eventpoll_inode(); |
723 | error = PTR_ERR(inode); | 723 | if (IS_ERR(inode)) { |
724 | if (IS_ERR(inode)) | 724 | error = PTR_ERR(inode); |
725 | goto eexit_2; | 725 | goto eexit_2; |
726 | } | ||
726 | 727 | ||
727 | /* Allocates a free descriptor to plug the file onto */ | 728 | /* Allocates a free descriptor to plug the file onto */ |
728 | error = get_unused_fd(); | 729 | error = get_unused_fd(); |