diff options
author | attilio <attilio@FreeBSD.org> | 2011-05-05 14:05:29 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-05-05 14:05:29 +0000 |
commit | d3d3db9bac709a7fa4319bf5e8c8fb4e05918772 (patch) | |
tree | 1f3fc48f78abc0f826bc204651c01b9f8bbaed60 /sys/geom/multipath | |
parent | f756d5bed6346f4902b1da276e52098882a7a66b (diff) | |
parent | 1e6b02c145b56555ee32db7471bf964bde2eade9 (diff) | |
download | FreeBSD-src-d3d3db9bac709a7fa4319bf5e8c8fb4e05918772.zip FreeBSD-src-d3d3db9bac709a7fa4319bf5e8c8fb4e05918772.tar.gz |
MFC
Diffstat (limited to 'sys/geom/multipath')
-rw-r--r-- | sys/geom/multipath/g_multipath.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 6c53f41..6720a87 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -293,9 +293,6 @@ g_multipath_create(struct g_class *mp, struct g_multipath_metadata *md) } gp = g_new_geomf(mp, md->md_name); - if (gp == NULL) - goto fail; - sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); gp->softc = sc; gp->start = g_multipath_start; @@ -305,21 +302,12 @@ g_multipath_create(struct g_class *mp, struct g_multipath_metadata *md) memcpy(sc->sc_name, md->md_name, sizeof (sc->sc_name)); pp = g_new_providerf(gp, "multipath/%s", md->md_name); - if (pp == NULL) - goto fail; /* limit the provider to not have it stomp on metadata */ pp->mediasize = md->md_size - md->md_sectorsize; pp->sectorsize = md->md_sectorsize; sc->pp = pp; g_error_provider(pp, 0); return (gp); -fail: - if (gp != NULL) { - if (gp->softc != NULL) - g_free(gp->softc); - g_destroy_geom(gp); - } - return (NULL); } static int @@ -348,8 +336,6 @@ g_multipath_add_disk(struct g_geom *gp, struct g_provider *pp) } nxtcp = LIST_FIRST(&gp->consumer); cp = g_new_consumer(gp); - if (cp == NULL) - return (ENOMEM); error = g_attach(cp, pp); if (error != 0) { printf("GEOM_MULTIPATH: cannot attach %s to %s", |