Generated by: null/eno.cocci The various basic memory allocation functions don't return ERR_PTR --- /c/kernel-tests/src/linux/drivers/vhost/tcm_vhost.c +++ /tmp/cocci-output-16473-2fe139-tcm_vhost.c @@ -534,7 +534,7 @@ static int vhost_scsi_map_iov_to_sgl(str if (!sg) return -ENOMEM; pr_debug("%s sg %p sgl_count %u is_err %ld\n", __func__, - sg, sgl_count, IS_ERR(sg)); + sg, sgl_count, !sg); sg_init_table(sg, sgl_count); tv_cmd->tvc_sgl = sg;