cublasMalloc return success but set the pointer to 0...


I have a weird behavior on a GTX285 with cuda 2.3. In the following code, cublasMalloc return CUBLAS_STATUS_SUCCESS but set the pointer to 0.

    cublasAlloc(size, sizeof(real), (void**)&(self->devdata));
    if (CUBLAS_STATUS_SUCCESS != cublasGetError())
        std::cerr << "error allocating device memory\n";
        return -1;

On the cpu a NULL pointer is not valid. Is this valid on cuda? Should I change the if to check that self->datadev is not null? If I need to add this check, the doc for cublasMalloc is incomplete as it don’t tell anything about this.