don't try to free null bufpool

Signed-off-by: Ed L. Cashin <[EMAIL PROTECTED]>

diff -uprN a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
--- a/drivers/block/aoe/aoedev.c        2005-03-10 12:19:11.000000000 -0500
+++ b/drivers/block/aoe/aoedev.c        2005-03-10 12:19:25.000000000 -0500
@@ -146,7 +146,8 @@ aoedev_freedev(struct aoedev *d)
                put_disk(d->gd);
        }
        kfree(d->frames);
-       mempool_destroy(d->bufpool);
+       if (d->bufpool)
+               mempool_destroy(d->bufpool);
        kfree(d);
 }
 


-- 
  Ed L. Cashin <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to