kernel: Remove another NULL check after kmalloc() with M_WAITOK.
authorSascha Wildner <saw@online.de>
Tue, 6 Dec 2011 19:01:11 +0000 (20:01 +0100)
committerSascha Wildner <saw@online.de>
Tue, 6 Dec 2011 19:02:18 +0000 (20:02 +0100)
sys/dev/disk/dm/targets/crypt/dm_target_crypt.c

index fbe42d7..aa489ea 100644 (file)
@@ -563,11 +563,6 @@ dm_target_crypt_init(dm_dev_t * dmv, void **target_config, char *params)
 #endif
 
        priv = kmalloc(sizeof(dm_target_crypt_config_t), M_DMCRYPT, M_WAITOK);
-       if (priv == NULL) {
-               kprintf("dm_target_crypt: could not allocate memory\n");
-               kfree(status_str, M_DMCRYPT);
-               return ENOMEM;
-       }
 
        /* Insert dmp to global pdev list */
        if ((priv->pdev = dm_pdev_insert(dev)) == NULL) {