]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/vt6656/rxtx.c
Merge branches 'iommu/fixes', 'tracing', 'core', 'arm/tegra' and 'x86/vt-d' into...
[karo-tx-linux.git] / drivers / staging / vt6656 / rxtx.c
index fb743a8811bbc9c0c8c37d23bde37a96b863d735..14f3e852215da5fb27702b4b91687047b9a290c2 100644 (file)
@@ -148,6 +148,8 @@ static void *s_vGetFreeContext(struct vnt_private *pDevice)
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
 
     for (ii = 0; ii < pDevice->cbTD; ii++) {
+       if (!pDevice->apTD[ii])
+               return NULL;
         pContext = pDevice->apTD[ii];
         if (pContext->bBoolInUse == false) {
             pContext->bBoolInUse = true;