em28xx-i2c: rt_mutex_trylock() returns zero on failure
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 May 2016 08:22:55 +0000 (05:22 -0300)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:03:34 +0000 (11:03 +0100)
commitc05b6f0adec9156d284c369002f9d7b0f053aa1e
treea3133833bb3fe97f7532ddd33d8f1a978828da7b
parent24e4e0023a75da713b06c8de0ee1849534a54bd9
em28xx-i2c: rt_mutex_trylock() returns zero on failure

commit e44c153b30c9a0580fc2b5a93f3c6d593def2278 upstream.

The code is checking for negative returns but it should be checking for
zero.

Fixes: aab3125c43d8 ('[media] em28xx: add support for registering multiple i2c buses')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/media/usb/em28xx/em28xx-i2c.c