summaryrefslogtreecommitdiff
path: root/fs/ubifs/lpt_commit.c
diff options
context:
space:
mode:
authorShen Lichuan <shenlichuan@vivo.com>2024-08-28 16:59:08 +0800
committerRichard Weinberger <richard@nod.at>2024-11-14 17:58:45 +0100
commit94f5b1571ec8d90224675dd27e921053ff4f2370 (patch)
tree09105c5e646f4e8a48e6e2c837060bb4908b95c5 /fs/ubifs/lpt_commit.c
parent39ba2b9ac6fd61c67c83b8fd2a3ec6b0bea89490 (diff)
downloadlinux-94f5b1571ec8d90224675dd27e921053ff4f2370.tar.gz
linux-94f5b1571ec8d90224675dd27e921053ff4f2370.tar.bz2
linux-94f5b1571ec8d90224675dd27e921053ff4f2370.zip
ubifs: Convert to use ERR_CAST()
As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/lpt_commit.c')
-rw-r--r--fs/ubifs/lpt_commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index 07351fdce722..aa8837e6247c 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -577,7 +577,7 @@ static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c,
/* Go right */
nnode = ubifs_get_nnode(c, nnode, iip);
if (IS_ERR(nnode))
- return (void *)nnode;
+ return ERR_CAST(nnode);
/* Go down to level 1 */
while (nnode->level > 1) {
@@ -594,7 +594,7 @@ static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c,
}
nnode = ubifs_get_nnode(c, nnode, iip);
if (IS_ERR(nnode))
- return (void *)nnode;
+ return ERR_CAST(nnode);
}
for (iip = 0; iip < UBIFS_LPT_FANOUT; iip++)