On Mon, May 28, 2018 at 01:58:41PM +0300, Laurent Pinchart wrote: > It would indeed be useful to implement, but I share your concern that this > would be pretty difficult. > > However, there's still something that puzzles me. Let's add a bit more > context. > > if (pipe->num_inputs > 2) > brx = &vsp1->bru->entity; > else if (pipe->brx && !drm_pipe->force_brx_release) > brx = pipe->brx; > else if (!vsp1->bru->entity.pipe) > brx = &vsp1->bru->entity; > else > brx = &vsp1->brs->entity; > > 1. if (!brx) > return -EINVAL; > > 2. if (brx != pipe->brx) { > ... > 3. pipe->brx = brx; > ... > } > > 4. format.pad = pipe->brx->source_pad > > > (1) ensures that brx can't be NULL. (2) is thus always true if pipe->brx is > NULL. (3) then assigns a non-NULL value to pipe->brx. Smatch should thus never > complain about (4), even if it can't backtrack. Oh wow... That's a very basic and ancient bug. I've written a fix and will push it out tomorrow if it passes my testing. regards, dan carpenter