diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-19 20:47:07 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-26 12:45:42 +0100 |
commit | db749359059f3049fc5c66950e5ca85f67d7c1b0 (patch) | |
tree | 05192a5286c39166540174b34a0f969a214d0999 /drivers/media/i2c/cx25840 | |
parent | [media] cx231xx: enable the analog tuner at buffer setup (diff) | |
download | linux-db749359059f3049fc5c66950e5ca85f67d7c1b0.tar.xz linux-db749359059f3049fc5c66950e5ca85f67d7c1b0.zip |
[media] cx25840: fix return logic when media entity init fails
There's no need to free state, as it was allocated via devm_kzalloc().
Also, let's return the error code, instead of something else.
Reported-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/cx25840')
-rw-r--r-- | drivers/media/i2c/cx25840/cx25840-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index cb4e03de9b75..185cb55253c9 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c @@ -5205,8 +5205,7 @@ static int cx25840_probe(struct i2c_client *client, state->pads, 0); if (ret < 0) { v4l_info(client, "failed to initialize media entity!\n"); - kfree(state); - return -ENODEV; + return ret; } #endif |