Commit Graph

23141 Commits

Author SHA1 Message Date
Colin Ian King 69117994aa [media] variable name is never null, so remove null check
The variable name is always assigned to a literal string in the
proceeding switch statement, so it is never null and hence the
null check is redundant. Remove null the check.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
2016-10-24 17:04:27 -02:00
Baoyou Xie 06c24f6779 [media] coda: add missing header dependencies
We get 1 warning when building kernel with W=1:
drivers/media/platform/coda/coda-h264.c:22:5: warning: no previous prototype for 'coda_h264_padding' [-Wmissing-prototypes]

In fact, this function is declared in coda.h, so this patch
add missing header dependencies.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-24 17:02:27 -02:00
Colin Ian King c0b34ab141 [media] cx24120: do not allow an invalid delivery system types
cx24120_set_frontend currently allows invalid delivery system types
other than SYS_DVBS2 and SYS_DVBS.  Fix this by returning -EINVAL
for invalid values.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jemma Denson <jdenson@gmail.com>
2016-10-24 17:00:42 -02:00
CIJOML CIJOMLovic 37e7856827 [media] Add support for EVOLVEO XtraTV stick
Add a new USB ID for EVOLVEO XtraTV stick.

[mchehab@s-opensource.org: fix patch and make checkpatch happy]
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 13:49:30 -02:00
Henrik Ingo e950267ab8 [media] uvcvideo: uvc_scan_fallback() for webcams with broken chain
Some devices have invalid baSourceID references, causing uvc_scan_chain()
to fail, but if we just take the entities we can find and put them
together in the most sensible chain we can think of, turns out they do
work anyway. Note: This heuristic assumes there is a single chain.

At the time of writing, devices known to have such a broken chain are
  - Acer Integrated Camera (5986:055a)
  - Realtek rtl157a7 (0bda:57a7)

Signed-off-by: Henrik Ingo <henrik.ingo@avoinelama.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 13:12:49 -02:00
Mauro Carvalho Chehab b2fdd0ee94 [media] stv06xx: store device name after the USB_DEVICE line
That makes easier to parse the names, in order to sync it
with gspca-cardlist.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 07:17:20 -02:00
Mauro Carvalho Chehab 0889e4a1bd [media] spca506: rewrite a commented line to avoid wrong parsing
Keeping Documentation/media/v4l-drivers/gspca-cardlist.rst in
sync with the gspca script requires a parser. Simplify the
commented line, to make the parser work better.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 07:16:40 -02:00
Laurent Pinchart bc9b91e6be [media] v4l: vsp1: Add support for capture and output in HSV formats
Support both the HSV24 and HSV32 formats. From a hardware point of view
pretend the formats are RGB, the RPF and WPF will just pass the data
through without performing any processing.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:55:43 -02:00
Ricardo Ribalda Delgado 429175e41f [media] vivid: Add support for HSV encoding
Support HSV encoding. Most of the logic is replicated from ycbcr_enc.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:54:16 -02:00
Ricardo Ribalda Delgado f1eb926d1d [media] vivid: Local optimization
Avoid duplicated clamps when possible.

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:51:23 -02:00
Ricardo Ribalda Delgado 7a20f3985f [media] vivid: Fix YUV555 and YUV565 handling
precalculate_color() had a optimization that avoided duplicated
conversion for YUV formats. This optimization did not take into
consideration YUV444, YUV555, YUV565 or limited range quantization.

This patch keeps the optimization, but fixes the wrong handling.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:50:58 -02:00
Ricardo Ribalda Delgado ca2b32da59 [media] vivid: Introduce TPG_COLOR_ENC_LUMA
Simplifies handling of Gray formats.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:50:27 -02:00
Ricardo Ribalda Delgado 25e9007349 [media] vivid: Rename variable
r_y and g_u now also contain the H and V components on the HSV formats.
Rename the variables to reflect this.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:49:46 -02:00
Ricardo Ribalda Delgado 54fb153483 [media] vivid: Add support for HSV formats
This patch adds support for V4L2_PIX_FMT_HSV24 and V4L2_PIX_FMT_HSV32.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:49:14 -02:00
Ricardo Ribalda Delgado 646895e936 [media] vivid: Code refactor for color encoding
Replace is_yuv with color_enc Which can be used by other
color encodings such us HSV.

This change should ease the review of the following patches.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:47:32 -02:00
Ricardo Ribalda Delgado 66b2ab271a [media] videodev2.h Add HSV formats
These formats store the color information of the image
in a geometrical representation. The colors are mapped into a
cylinder, where the angle is the HUE, the height is the VALUE
and the distance to the center is the SATURATION. This is a very
useful format for image segmentation algorithms.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:44:54 -02:00
Sakari Ailus 93bef23024 [media] smiapp: Implement support for autosuspend
Delay suspending the device by 1000 ms by default. This is done on
explicit power off through s_power() callback, through releasing the
file descriptor, NVM read or when the probe finishes.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:42:43 -02:00
Sakari Ailus cbba45d436 [media] smiapp: Use runtime PM
Switch to runtime PM in sensor power management. The internal power count
is thus removed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:42:06 -02:00
Sakari Ailus 4ecc2d75c0 [media] smiapp: Set use suspend and resume ops for other functions
Use the suspend and resume ops for freeze, thaw, poweroff and restore
callbacks as well.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:40:53 -02:00
Sakari Ailus df77542ede [media] smiapp: Set device for pixel array and binner
The dev field of the v4l2_subdev was left NULL for the pixel array and
binner sub-devices. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:34:37 -02:00
Sakari Ailus 88b3e311b5 [media] smiapp: Drop BUG_ON() in suspend path
Checking that the mutex is not acquired is unnecessary for user processes
are stopped by this point. Drop the check.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:24:49 -02:00
Sakari Ailus b08726bf2e [media] smiapp-pll: Don't complain aloud about failing PLL calculation
Don't complain about a failure to compute the pre_pll divisor. The
function is used to determine whether a particular combination of bits per
sample value and a link frequency can be used, in which case there are
lots of unnecessary driver messages. During normal operation the failure
generally does not happen. Use dev_dbg() instead.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:15:06 -02:00
Sakari Ailus fbffb28f03 [media] smiapp: Drop a debug print on frame size and bit depth
The first time the sensor is powered on, the information is not yet
available.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:14:36 -02:00
Sakari Ailus 1b81717ed7 [media] smiapp: Obtain correct media bus code for try format
The media bus code obtained for try format may have been a code that the
sensor did not even support. Use a supported code with the current pixel
order.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:13:26 -02:00
Sakari Ailus 2aa8e838a3 [media] smiapp: Remove useless newlines and other small cleanups
The code probably has been unindented at some point but rewrapping has not
been done. Do it now.

Also remove a useless memory allocation failure message.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:10:44 -02:00
Sakari Ailus e43665a9d7 [media] smiapp: Improve debug messages from frame layout reading
Provide more debugging information on reading the frame layout.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:09:40 -02:00
Sakari Ailus 3fc34b7beb [media] smiapp: Obtain frame layout from the frame descriptor
Besides the image data, SMIA++ compliant sensors also provide embedded
data in form of registers used to capture the image. Store this
information for later use in frame descriptor and routing.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:09:06 -02:00
Sakari Ailus df0e40339b [media] smiapp: Use SMIAPP_PADS when referring to number of pads
Replace plain value 2 with SMIAPP_PADS when referring to the number of
pads.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:08:13 -02:00
Sakari Ailus a118e61edc [media] smiapp: Unify setting up sub-devices
The initialisation of the source sub-device is somewhat different as it's
not created by the smiapp driver itself. Remove redundancy in initialising
the two kind of sub-devices.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:07:38 -02:00
Sakari Ailus 1344bf74c9 [media] smiapp: Read frame format earlier
The information gathered during frame format reading will be required
earlier in the initialisation when it was available. Also return an error
if frame format cannot be obtained.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:04:28 -02:00
Sakari Ailus 3ecb86641b [media] smiapp: Merge smiapp_init() with smiapp_probe()
The smiapp_probe() is the sole caller of smiapp_init(). Unify the two.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:03:52 -02:00
Sakari Ailus 9976954075 [media] smiapp: Fix resource management in registration failure
If the registered() callback failed, resources were left unaccounted for.
Fix this, as well as add unregistering the sub-devices in driver
unregistered() callback.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:03:04 -02:00
Sakari Ailus 231d1a014a [media] smiapp: Always initialise the sensor in probe
Initialise the sensor in probe. The reason why it wasn't previously done
in case of platform data was that the probe() of the driver that provided
the clock through the set_xclk() callback would need to finish before the
probe() function of the smiapp driver. The set_xclk() callback no longer
exists.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:00:06 -02:00
Sakari Ailus 624e9896c5 [media] smiapp: Remove unnecessary BUG_ON()'s
Instead, calculate how much is needed and then allocate the memory
dynamically.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 14:59:07 -02:00
Sakari Ailus 6c5ff7c8e8 [media] smiapp: Provide a common function to obtain native pixel array size
The same pixel array size is required for the active format of each
sub-device sink pad and try format of each sink pad of each opened file
handle as well as for the native size rectangle.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 14:58:22 -02:00
Sakari Ailus 2fca9ca0d6 [media] smiapp: Split off sub-device registration into two
Remove the loop in sub-device registration and create each sub-device
explicitly instead.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 14:55:31 -02:00
Sakari Ailus 6d8d61fe66 [media] smiapp: Initialise media entity after sensor init
This allows determining the number of pads in the entity based on the
sensor.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 14:20:01 -02:00
Sakari Ailus cc1488a1fc [media] smiapp: Explicitly define number of pads in initialisation
Define the number of pads explicitly in initialising the sub-devices.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 14:18:24 -02:00
Sakari Ailus b7547ef867 [media] smiapp: Move sub-device initialisation into a separate function
Simplify smiapp_init() by moving the initialisation of individual
sub-devices to a separate function.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 14:17:36 -02:00
Hans Verkuil 669c6141ea [media] mtk-mdp: fix double mutex_unlock
Fix smatch error:

media-git/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:100 mtk_mdp_vpu_send_msg() error: double unlock 'mutex:&ctx->mdp_dev->vpulock'

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:53 -02:00
Minghsiu Tsai 1b06fcf56a [media] media: mtk-mdp: fix build error
This patch fix build error without CONFIG_PM_RUNTIME
and CONFIG_PM_SLEEP

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:51 -02:00
Minghsiu Tsai 37bf7e34ec [media] media: mtk-mdp: fix build warning in arch x86
This patch fix build warning in arch x86

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:50 -02:00
Minghsiu Tsai 859b5e407d [media] media: mtk-mdp: support pixelformat V4L2_PIX_FMT_MT21C
Add V4L2_PIX_FMT_MT21C in format list.

[mchehab@s-opensource.org: re-add mtk_mdp_size_align]

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:48 -02:00
Mauro Carvalho Chehab 004b93b9e9 [media] mtk-mdp: fix compilation warnings if !DEBUG
The mtk_mdp_dbg() is empty if !DEBUG. This causes the following
warnings:

	drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c: In function ‘mtk_mdp_try_fmt_mplane’:
	drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:231:52: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
	        org_w, org_h, pix_mp->width, pix_mp->height);
                                                    ^
	drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c: In function ‘mtk_mdp_m2m_start_streaming’:
	drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:414:21: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
	        ctx->id, ret);
	                     ^

With could actually make the code to do something wrong. So,
add an empty block to make it be parsed ok.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:41 -02:00
Minghsiu Tsai c8eb2d7e82 [media] media: Add Mediatek MDP Driver
Add MDP driver for MT8173

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:38 -02:00
Minghsiu Tsai 737ea6cfd2 [media] VPU: mediatek: Add mdp support
VPU driver add mdp support

[mchehab@s-opensource.com: fix a merge conflict and make checkpatch happy]

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:37 -02:00
Tiffany Lin 8608251262 [media] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
Add V4L2_PIX_FMT_MT21C support

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:36 -02:00
Tiffany Lin d4de663458 [media] v4l: add Mediatek compressed video block format
Add V4L2_PIX_FMT_MT21C format used on MT8173 driver.
It is compressed format and need MT8173 MDP driver to transfer to other
standard format.

Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:34 -02:00
Colin Ian King 211eba9e79 [media] VPU: mediatek: fix null pointer dereference on pdev
pdev is being null checked, however, prior to that it is being
dereferenced by platform_get_drvdata.  Move the assignments of
vpu and run to after the pdev null check to avoid a potential
null pointer dereference.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:34 -02:00
Julia Lawall fa44d3b9e7 [media] vcodec: mediatek: fix odd_ptr_err.cocci warnings
PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 12:09:32 -02:00