Commit 94f5b157 authored by Shen Lichuan's avatar Shen Lichuan Committed by Richard Weinberger
Browse files

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: default avatarShen Lichuan <shenlichuan@vivo.com>
Reviewed-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 39ba2b9a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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++)