diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 25d58e766014..1d3c5144a331 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -986,8 +986,10 @@ static int cache_open(struct inode *inode, struct file *filp, | |||
986 | nonseekable_open(inode, filp); | 986 | nonseekable_open(inode, filp); |
987 | if (filp->f_mode & FMODE_READ) { | 987 | if (filp->f_mode & FMODE_READ) { |
988 | rp = kmalloc(sizeof(*rp), GFP_KERNEL); | 988 | rp = kmalloc(sizeof(*rp), GFP_KERNEL); |
989 | if (!rp) | 989 | if (!rp) { |
990 | module_put(cd->owner); | ||
990 | return -ENOMEM; | 991 | return -ENOMEM; |
992 | } | ||
991 | rp->offset = 0; | 993 | rp->offset = 0; |
992 | rp->q.reader = 1; | 994 | rp->q.reader = 1; |
993 | atomic_inc(&cd->readers); | 995 | atomic_inc(&cd->readers); |