From patchwork Fri Mar 7 16:14:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 3792961 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 20E209F35F for ; Fri, 7 Mar 2014 16:14:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 443DB202EA for ; Fri, 7 Mar 2014 16:14:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77A04202BE for ; Fri, 7 Mar 2014 16:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753496AbaCGQOL (ORCPT ); Fri, 7 Mar 2014 11:14:11 -0500 Received: from smtp-out-096.synserver.de ([212.40.185.96]:1087 "EHLO smtp-out-014.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753240AbaCGQOJ (ORCPT ); Fri, 7 Mar 2014 11:14:09 -0500 Received: (qmail 12981 invoked by uid 0); 7 Mar 2014 16:14:00 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 12887 Received: from p4fe60487.dip0.t-ipconnect.de (HELO lars-adi-laptop.analog.com) [79.230.4.135] by 217.119.54.73 with SMTP; 7 Mar 2014 16:13:59 -0000 From: Lars-Peter Clausen To: Hans Verkuil Cc: Vladimir Barinov , linux-media@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 2/7] [media] adv7180: Free control handler on remove() Date: Fri, 7 Mar 2014 17:14:28 +0100 Message-Id: <1394208873-23260-2-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1394208873-23260-1-git-send-email-lars@metafoo.de> References: <1394208873-23260-1-git-send-email-lars@metafoo.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure to free the control handler when the device is removed. Signed-off-by: Lars-Peter Clausen --- drivers/media/i2c/adv7180.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 1a3622a..2359fd8 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -641,6 +641,7 @@ static int adv7180_remove(struct i2c_client *client) } v4l2_device_unregister_subdev(sd); + adv7180_exit_controls(state); mutex_destroy(&state->mutex); return 0; }