fimc-is: Remove BUG() from fimc_is_itf_s_param()
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Mon, 21 Aug 2017 16:19:50 +0000 (18:19 +0200)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:57:19 +0000 (14:57 +0900)
commit61695eeeff0e7ff8c29cc7a90373528b62839576
treee4c1eb21ee18125940069c44f8a6589b0897f968
parent935e0931b9db3bcefc82eda161c03314899abdd5
fimc-is: Remove BUG() from fimc_is_itf_s_param()

The condition being tested for that BUG() invocation is often
recoverable, so replace BUG() with a WARN_ON() and return EINVAL.
This prevents specific user space call sequences crashing the kernel,
which should never happen.
The callers of fimc_is_itf_s_param() function will be updated in
subsequent patches if necessary, to prevent any further possible
crashes.

Change-Id: I90a08278baa0cee85a4a69fa1b278e28e5c6764a
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/exynos/fimc-is/fimc-is-device-ischain.c