usb_control_msg returns -EPIPE

I am converting WinCE USB Code to Linux, so here is the WinCE code that gets the APP Revision using Control message.

        ControlHeader.bmRequestType = USB_REQUEST_DEVICE_TO_HOST | USB_REQUEST_VENDOR | USB_REQUEST_FOR_INTERFACE;
        ControlHeader.bRequest = RADS_GET_APPREVISION;
        ControlHeader.wValue = 0;                               // unused
        ControlHeader.wIndex = 0;                               // unused
        ControlHeader.wLength = sizeof(USHORT);                 // size of output buffer

        dwError = IssueVendorTransfer(pGENDevice->lpUsbFuncs,
                                      pGENDevice->hUsbDevice,
                                      NULL,
                                      NULL,
                                      (USB_IN_TRANSFER|USB_SHORT_TRANSFER_OK),
                                      &ControlHeader,
                                      pusTemp,
                                      0,
                                      &dwBytesTransferred,
                                      0,
                                      &dwUsbError); 

I converted it as below for Linux:

 retval = usb_control_msg(dev->usb_dev,
                                                usb_rcvctrlpipe(dev->usb_dev, 0),
                                                RADS_GET_APPREVISION,
                                                USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
                                                0,
                                                0,
                                                &appRevision,
                                                sizeof(unsigned short),
                                                USB_CTRL_SET_TIMEOUT);

I am getting -EPIPE as retval. What does the return value -EPIPE signifies

Can you help me in resolving this issue.. Thanks for your time..