Skip to content

Commit 94f5b15

Browse files
Shen Lichuanrichardweinberger
authored andcommitted
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 <[email protected]> Reviewed-by: Zhihao Cheng <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 39ba2b9 commit 94f5b15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ubifs/lpt_commit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c,
577577
/* Go right */
578578
nnode = ubifs_get_nnode(c, nnode, iip);
579579
if (IS_ERR(nnode))
580-
return (void *)nnode;
580+
return ERR_CAST(nnode);
581581

582582
/* Go down to level 1 */
583583
while (nnode->level > 1) {
@@ -594,7 +594,7 @@ static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c,
594594
}
595595
nnode = ubifs_get_nnode(c, nnode, iip);
596596
if (IS_ERR(nnode))
597-
return (void *)nnode;
597+
return ERR_CAST(nnode);
598598
}
599599

600600
for (iip = 0; iip < UBIFS_LPT_FANOUT; iip++)

0 commit comments

Comments
 (0)