From patchwork Thu Jan 2 22:06:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 234723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3A37C3276D for ; Thu, 2 Jan 2020 22:29:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6A6F2465A for ; Thu, 2 Jan 2020 22:29:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004167; bh=5wFFjMMWP1GFYZOGlALnTNBKLnThrbC2mgnQDSbxH+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WfBLlHgFBbqhjgOamz82bSG7DF7/G8HzhVgt3Sp4UTYlTAv5tzu0oWbWiZPvPrZ6y nVO5/uqPzCh/iGBNWf4rJmycEEyBfqKLWyvNlT3GPCUjzx4SwY5qPm1Eyk6lWq1YLu +PIZjiR5vxct+uf13O2yethXqblcNgW7nZ0HxnlE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730020AbgABW3Z (ORCPT ); Thu, 2 Jan 2020 17:29:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:60424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730042AbgABW3Z (ORCPT ); Thu, 2 Jan 2020 17:29:25 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4EA8E227BF; Thu, 2 Jan 2020 22:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004164; bh=5wFFjMMWP1GFYZOGlALnTNBKLnThrbC2mgnQDSbxH+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YCcR56LcDPbfwf/S1kaoId3t0+g5MFgqDuY//mBhFil6VukSBUkbrrvb9UpEzob6N UBTrU1xmIvXR0InrcFxNlIDseIOiP2sAEewiaQP99NkDavVve+xkguQJhE91YP247B 9vDbvOskaD4d6izBas8M5hshdqwE5zPyqoDtOWdM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.9 064/171] media: si470x-i2c: add missed operations in remove Date: Thu, 2 Jan 2020 23:06:35 +0100 Message-Id: <20200102220555.750731814@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.960200039@linuxfoundation.org> References: <20200102220546.960200039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chuhong Yuan [ Upstream commit 2df200ab234a86836a8879a05a8007d6b884eb14 ] The driver misses calling v4l2_ctrl_handler_free and v4l2_device_unregister in remove like what is done in probe failure. Add the calls to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/radio/si470x/radio-si470x-i2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c index f218886c504d..fb69534a8b56 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c @@ -460,6 +460,8 @@ static int si470x_i2c_remove(struct i2c_client *client) video_unregister_device(&radio->videodev); kfree(radio); + v4l2_ctrl_handler_free(&radio->hdl); + v4l2_device_unregister(&radio->v4l2_dev); return 0; }