[media] em28xx: don't treat device as webcam if an unknown sensor is detected
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sat, 15 Apr 2017 10:05:02 +0000 (07:05 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 17 Apr 2017 20:32:15 +0000 (17:32 -0300)
commit85316cf8da9e808f28c81343a050f489ac03e20e
treea1a52cae096ef81c82a4c9fb4e1e90a763748928
parentbb42fc4ad442d4de78b4a16233db98a5396988ff
[media] em28xx: don't treat device as webcam if an unknown sensor is detected

With an unknown sensor, norm_maxw() and norm_maxh() return 0 as max.
height and width values, which causes a devide by zero in size_to_scale().
Of course we could use speculative default values for unknown sensors,
but the chance that the device works at this resolution without any
driver/setup is very low and therefore not worth the efforts.
Instead, just don't treat the device as camera.
A message will then be printed to the log that the device isn't supported.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/em28xx/em28xx-cards.c