cudaErrorInvalidValue from cudaBindTexture2D()

typedef unsigned char BYTE;
texture<BYTE, cudaTextureType2D> tex;
__device__ BYTE gpbFace[5684800];

host code

BYTE* pbPtr;
cudaGetSymbolAddress((void**)&pbPtr, gpbFace);
int srcWidth,srcHeight,srcPitch;
srcWidth = 1296; srcHeight = 972; srcPitch = srcWidth;
cudaBindTexture2D(0,tex,pbPtr, srcWidth,srcHeight,srcPitch);
cudaError_t error = cudaGetLastError();

above code returns cudaErrorInvalidValue.
What is the problem?
Thanks in advance.

srcPitch = srcWidth;

that doesn’t look right. You don’t get to decide your own pitch.

Yes, you are right, I found where problem is.
So, i posted my answer to stackoverflow.
You are helpful always, anyway.
Thanks txbob.