From patchwork Tue May 8 06:14:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 10385411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 951BC6037F for ; Tue, 8 May 2018 06:14:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85938289B9 for ; Tue, 8 May 2018 06:14:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7919928CC2; Tue, 8 May 2018 06:14:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72F2E289B9 for ; Tue, 8 May 2018 06:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754119AbeEHGOQ (ORCPT ); Tue, 8 May 2018 02:14:16 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:45042 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754000AbeEHGOP (ORCPT ); Tue, 8 May 2018 02:14:15 -0400 Received: from ubuntu-CJ.home ([86.244.116.1]) by mwinf5d79 with ME id jiED1x00301t9Ri03iED68; Tue, 08 May 2018 08:14:14 +0200 X-ME-Helo: ubuntu-CJ.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 08 May 2018 08:14:14 +0200 X-ME-IP: 86.244.116.1 From: Christophe JAILLET To: tharvey@gateworks.com, mchehab@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] media: i2c: tda1997: Fix an error handling path 'tda1997x_probe()' Date: Tue, 8 May 2018 08:14:15 +0200 Message-Id: <20180508061415.10945-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.17.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If 'media_entity_pads_init()' fails, we must free the resources allocated by 'v4l2_ctrl_handler_init()', as already done in the previous error handling path. 'goto' the right label to fix it. Fixes: 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver") Signed-off-by: Christophe JAILLET --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 31bdab96f380..039a92c3294a 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2723,7 +2723,7 @@ static int tda1997x_probe(struct i2c_client *client, state->pads); if (ret) { v4l_err(client, "failed entity_init: %d", ret); - goto err_free_mutex; + goto err_free_handler; } ret = v4l2_async_register_subdev(sd);