The iget_locked() function returns NULL on error and never an ERR_PTR.
Unified · Split
| @@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino) · 56 unmodified lines | |||
| 57 | struct inode *inode; | 57 | struct inode *inode; |
| 58 | 58 | ||
| 59 | inode = iget_locked(super, ino); | 59 | inode = iget_locked(super, ino); |
| 60 | if (IS_ERR(inode)) | 60 | if (!inode) |
| 61 | return ERR_PTR(-ENOMEM); | 61 | return ERR_PTR(-ENOMEM); |
| 62 | if (!(inode->i_state & I_NEW)) | 62 | if (!(inode->i_state & I_NEW)) |
| 63 | return inode; | 63 | return inode; |