From: Dan Carpenter Date: Mon, 10 Jan 2011 17:10:50 +0000 (-0500) Subject: ext4: use IS_ERR() to check for errors in ext4_error_file X-Git-Tag: v2.6.38-rc1~409^2~19 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f9a62d090cf47fae2fe6f6bd8eb9f24482573fd8;p=~emulex%2Finfiniband.git ext4: use IS_ERR() to check for errors in ext4_error_file d_path() returns an ERR_PTR and it doesn't return NULL. This is in ext4_error_file() and no one actually calls ext4_error_file(). Signed-off-by: Dan Carpenter --- diff --git a/fs/ext4/super.c b/fs/ext4/super.c index c228da112de..d49e3b1ec41 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -437,7 +437,7 @@ void ext4_error_file(struct file *file, const char *function, save_error_info(inode->i_sb, function, line); va_start(args, fmt); path = d_path(&(file->f_path), pathname, sizeof(pathname)); - if (!path) + if (IS_ERR(path)) path = "(unknown)"; printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: inode #%lu "