media: solo6x10: simplify the logic at solo_p2m_dma_desc()
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Mar 2018 10:48:07 +0000 (06:48 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Mar 2018 10:54:33 +0000 (06:54 -0400)
commit0df305eb50e5dc447ddb9eab71bc7394cb9e76e4
treec8b574e122a557a2c6457993de6dd50410b6490c
parentd3c449e16fc829dba347dc72106f8d28b15896f9
media: solo6x10: simplify the logic at solo_p2m_dma_desc()

The logic with gets a p2m_id is more complex than needed,
causing false positives with static analyzers:

drivers/media/pci/solo6x10/solo6x10-p2m.c:81 solo_p2m_dma_desc() error: buffer overflow 'solo_dev->p2m_dev' 4 <= s32max

Make it simpler and use unsigned int.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/solo6x10/solo6x10-p2m.c