CID 232745: Dereferencing null pointer
CID 234028: Using uninitialized value
Change-Id: I6048a3b013688d706ad46b6944102c88fb960bbb
Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
struct device *alloc_devs[])
{
struct smfc_ctx *ctx = vb2_get_drv_priv(vq);
- unsigned int i;
if (!(ctx->flags & SMFC_CTX_COMPRESS) && (*num_buffers > 1)) {
dev_info(ctx->smfc->dev,
*/
sizes[0] = PAGE_SIZE;
*num_planes = 1;
- alloc_devs[i] = ctx->smfc->dev;
+ alloc_devs[0] = ctx->smfc->dev;
if (!!(ctx->flags & SMFC_CTX_B2B_COMPRESS)) {
sizes[1] = PAGE_SIZE;
alloc_devs[1] = ctx->smfc->dev;