cmn600: Stop checking for failures from malloc/mallocarray(M_WAITOK)

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45852
This commit is contained in:
Zhenlei Huang 2024-09-03 18:25:22 +08:00
parent fe6985ef87
commit 1d321c1907

View File

@ -332,9 +332,6 @@ cmn600_create_node(struct cmn600_softc *sc, off_t node_offset,
int i;
node = malloc(sizeof(struct cmn600_node), M_DEVBUF, M_WAITOK);
if (node == NULL)
return (NULL);
node->sc = sc;
node->nd_offset = node_offset;
node->nd_parent = parent;
@ -399,8 +396,6 @@ cmn600_create_node(struct cmn600_softc *sc, off_t node_offset,
node->nd_children = (struct cmn600_node **)mallocarray(
node->nd_child_count, sizeof(struct cmn600_node *), M_DEVBUF,
M_WAITOK);
if (node->nd_children == NULL)
goto FAIL;
for (i = 0; i < node->nd_child_count; i++) {
val = node->nd_read8(node, child_offset + (i * 8));
node->nd_children[i] = cmn600_create_node(sc, val &
@ -420,9 +415,6 @@ cmn600_create_node(struct cmn600_softc *sc, off_t node_offset,
break;
}
return (node);
FAIL:
free(node, M_DEVBUF);
return (NULL);
}
static void