Hello Laurent Pinchart,

This is a semi-automatic email about new static checker warnings.

The patch 6134148f6098: "v4l: vsp1: Add support for the BRS entity"
from May 25, 2017, leads to the following Smatch complaint:

    drivers/media/platform/vsp1/vsp1_wpf.c:456 wpf_configure()
    error: we previously assumed 'pipe->bru' could be null (see line 450)

drivers/media/platform/vsp1/vsp1_wpf.c
   449  
   450                  srcrpf |= (!pipe->bru && pipe->num_inputs == 1)
   451                          ? 
VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index)
   452                          : 
VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index);
   453          }
   454  
   455          if (pipe->bru || pipe->num_inputs > 1)
                    ^^^^^^^^^
Check for NULL.

   456                  srcrpf |= pipe->bru->type == VSP1_ENTITY_BRU
                                  ^^^^^^^^^^^
Patch adds new unchecked dereference.

   457                          ? VI6_WPF_SRCRPF_VIRACT_MST
   458                          : VI6_WPF_SRCRPF_VIRACT2_MST;

regards,
dan carpenter

Reply via email to