From: Dan Carpenter Date: Wed, 13 Nov 2013 07:49:40 +0000 (+0300) Subject: aio: checking for NULL instead of IS_ERR X-Git-Tag: v3.13-rc1~102^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f62656be8a8ef14c168db2d98021fb9c8cc1076;p=kernel%2Fkernel-generic.git aio: checking for NULL instead of IS_ERR alloc_anon_inode() returns an ERR_PTR(), it doesn't return NULL. Fixes: 71ad7490c1f3 ('rework aio migrate pages to use aio fs') Signed-off-by: Dan Carpenter Signed-off-by: Al Viro --- diff --git a/fs/aio.c b/fs/aio.c index 1f602d9..823efcb 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -163,8 +163,8 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) struct file *file; struct path path; struct inode *inode = alloc_anon_inode(aio_mnt->mnt_sb); - if (!inode) - return ERR_PTR(-ENOMEM); + if (IS_ERR(inode)) + return ERR_CAST(inode); inode->i_mapping->a_ops = &aio_ctx_aops; inode->i_mapping->private_data = ctx;