     report("Getting controller reference");
     int nvmerr = nvm_ctrl_init(&controller, settings.controllerId);
     report(nvmerr);
-    if (err != 0)
+    if (nvmerr != 0)
     {
         return 2;
     }

#include <cuda.h>
#include <nvm_types.h>
#include <nvm_ctrl.h>
#include <nvm_manager.h>

        settings.chunkSize = ci.max_transfer_size;
    }

    settings.chunkSize = DMA_SIZE(settings.chunkSize, ctrl->page_size);

    settings.blockSize = ni.lba_data_size;
}
