     (rv,ptr,pitch) <- cudaMallocPitch width height
     case rv of
         Success -> doAutoRelease cudaFree_ >>= \fp ->
-                   newDevicePtr fp ptr >>= \dp -> return.Right $ (dp,pitch)
+                   newDevicePtr fp ptr     >>= \dp -> return.Right $ (dp,pitch)
         _       -> return.Left $ getErrorString rv
 
 {# fun unsafe cudaMallocPitch
-    { alloca-  `Ptr ()' peek*         ,
+    { alloca-  `Ptr ()'  peek*        ,
       alloca-  `Integer' peekIntConv* ,
       cIntConv `Integer'              ,
       cIntConv `Integer'              } -> `Status' cToEnum #}

--
-- Initialize device memory to a given value
--
memset                  :: DevicePtr -> Integer -> Int -> IO (Maybe String)
memset ptr symbol bytes =  nothingIfOk `fmap` cudaMemset ptr bytes symbol

{# fun unsafe cudaMemset

    (rv,ptr) <- cudaMalloc bytes
    case rv of
        Success -> doAutoRelease cudaFree_ >>= \fp ->
                   newDevicePtr fp ptr     >>= (return.Right)
        _       -> return.Left $ getErrorString rv

{# fun unsafe cudaMalloc
