]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/target/target_core_iblock.c
blk-integrity: empty implementation when disabled
[mirror_ubuntu-artful-kernel.git] / drivers / target / target_core_iblock.c
index f29c69120054463eee986c0ab6ed48ec6c504c39..d5891b6ea737068b47eb6157a4e726a74a92398d 100644 (file)
@@ -613,9 +613,9 @@ iblock_alloc_bip(struct se_cmd *cmd, struct bio *bio)
        }
 
        bip = bio_integrity_alloc(bio, GFP_NOIO, cmd->t_prot_nents);
-       if (!bip) {
+       if (IS_ERR(bip)) {
                pr_err("Unable to allocate bio_integrity_payload\n");
-               return -ENOMEM;
+               return PTR_ERR(bip);
        }
 
        bip->bip_iter.bi_size = (cmd->data_length / dev->dev_attrib.block_size) *