--- 202fa0f4b805c2987c76d0df2b72387bfc71097f +++ 4709052c1b0499b22c434306ac89c01cd252e2c4 @@ -3072,6 +3072,9 @@ megasas_mgmt_fw_ioctl(struct megasas_ins * For each user buffer, create a mirror buffer and copy in */ for (i = 0; i < ioc->sge_count; i++) { + if (!ioc->sgl[i].iov_len) + continue; + kbuff_arr[i] = dma_alloc_coherent(&instance->pdev->dev, ioc->sgl[i].iov_len, &buf_handle, GFP_KERNEL);