OSDN Git Service

media: max2175: fix max2175_set_csm_mode() error code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Mar 2020 14:23:12 +0000 (15:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:57 +0000 (11:25 +0100)
[ Upstream commit 9b1b0cb0636166187478ef68d5b95f5caea062ec ]

This is supposed to return negative error codes but the type is bool so
it returns true instead.

Fixes: b47b79d8a231 ("[media] media: i2c: max2175: Add MAX2175 support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/max2175.c

index 008a082..dddc5ef 100644 (file)
@@ -511,7 +511,7 @@ static void max2175_set_bbfilter(struct max2175 *ctx)
        }
 }
 
-static bool max2175_set_csm_mode(struct max2175 *ctx,
+static int max2175_set_csm_mode(struct max2175 *ctx,
                          enum max2175_csm_mode new_mode)
 {
        int ret = max2175_poll_csm_ready(ctx);