media: pt1: fix logic when pt1_nr_tables is zero or negative
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 1 Nov 2017 21:05:52 +0000 (17:05 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 11 Dec 2017 18:04:55 +0000 (13:04 -0500)
commite639c869558cc1172cacf7477819c7e9db60e3a4
tree3c26c9051f3461a5328ccc77b30214692382663b
parent29236349aa7dfc5556424261240be9050187b49d
media: pt1: fix logic when pt1_nr_tables is zero or negative

pt1_nr_tables is a modprobe parameter. The way the logic
handles it, it can't be negative. However, user can
set it to zero.

If set to zero, however, it will cause troubles at
pt1_init_tables(), as reported by smatch:
drivers/media/pci/pt1/pt1.c:468 pt1_init_tables() error: uninitialized symbol 'first_pfn'.

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