Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3585200ybx; Fri, 8 Nov 2019 23:58:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxdlVz6Jsr7lEOloBxLZmKgH3H3duoC4VGrJ9iV6oaFRj/RWuOy0XGtWZG2NlCWmTxI00/u X-Received: by 2002:a17:906:25c5:: with SMTP id n5mr12569530ejb.126.1573286305856; Fri, 08 Nov 2019 23:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573286305; cv=none; d=google.com; s=arc-20160816; b=puLrrQ8dLMCycPph4y/XuCq32Efwza9qeFD47zh/oSdMmj2gsldrZa4w/IFaEU2+CI +ER4DhubCILo45i6AS4yiFYZvMWWnUR78Iqk6PC2MAuJwwFsPMDAUvMskNF+GGybavvl PUm0HAQPyQGBgayAUto8Un2bcDIOHi1gm1JYCqAo91ZSMlA3dJPhyUFb0y1qjzll0PDs kXW2sbcHC96AKAuxxL1yXDi61v+wquGa5oxEEW7xiwY/LCQjvABIH+Kzp/bq1RXAxcyx rH7qyJRgX2kB06phA9FTdjzO6E9ICLS9PjrBByLTrvG69UY5tXktm3m3IQOPhALPv47N cB2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=8W/ccs4K6JLyRSHC0w4jHHqe3aaM7BqlOGhm85RSpKQ=; b=eZoj+LxF6mshW/HQCTcyB5+rGPEl49nkrCZhKwO2nmVUF7Wk5PUTuYfrZsec9cThs+ Pk7UXjHK2xdbTOQqwC9IBH0KQPYwBsR5JDJWyDEZGvdw9YCLOeNHl/Tuw1/eoeQ77kA0 Y608JJLSzqQuStNK35fXFcq/JUcvB+ESOp7mbNMWJwahjtZDrHX3pqwoqJJxEleLVdKW SNb/HpC+GKIqJ798QkaHvUywiXPxnKm+2PTBScvfMSR1MEY7UjtG5vzcg+urlm99jIRx jygw60IS2k3OwGJsPZz6pr+nUw0TrUGTf5Qm7kW8avciLc6IZQGH7JW9n7PUZv0QlrX+ 0Ifg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ts2HKlm3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uz25si5364130ejb.43.2019.11.08.23.58.02; Fri, 08 Nov 2019 23:58:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ts2HKlm3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbfKIHzH (ORCPT + 99 others); Sat, 9 Nov 2019 02:55:07 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45239 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbfKIHzH (ORCPT ); Sat, 9 Nov 2019 02:55:07 -0500 Received: by mail-pf1-f193.google.com with SMTP id z4so6653283pfn.12; Fri, 08 Nov 2019 23:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8W/ccs4K6JLyRSHC0w4jHHqe3aaM7BqlOGhm85RSpKQ=; b=ts2HKlm3K87ZbGksWlPcPsJ4QzLLELtYF8GQLUSvelNwK7bWI7JaSpHmJcE49Q4e3P osVqxUO21B3uhDZTbhGI3NNfKG2o/qv2YYH6t/S8Omto0he78smvgi5/cSUoI65ccOUh LOinOIccc2sG9kMQ80NC6XiowwjdMKrTminAt8GoaIs8Q7rG0LHHlugPn669FEECykYV XAQTdRPlOEOe+Ps8dbkO18Yi3HMNyN66miGW7t6OyQDEb1l68r2S1GtHUqH0p1L0d0de sBbv6inF33jCSc3zNLbQPFkidPXRDq7j85Dv0PN0/3iALLjrW5jD9Lff+Sz8xnH6Mi2d SFIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8W/ccs4K6JLyRSHC0w4jHHqe3aaM7BqlOGhm85RSpKQ=; b=nkpu0I1Yt7AlwAliYGrP5nGkQpapfz/STc4T3GDgquoXCYU5kEFTbSIc/t4azOFuBX D/jeoTEu1++VmcSzP/kTFc1eT/M3pJ+XcASJufGyFr1L2DqFFlhzgMR6eT+GmdG4MOny 0DsXhYwq1ASGXDfaQUKnnF2EjwP+q3DDIF1rhpxwI/nJG/2JvZIvjuBpE0JEpOES6a7l 3EIOwF9FPOMKv49ue7XoOCpvrh2LP8ihFmE1a8mL5vKuziz2cmq3ZIuDZh1REq0nHp0m exdakIdPtSHyMTTRdgECNIrxLLvYmO5TcToyxAZbq4hMwIwohwUC++C6GTm9rmOJnrEx PDNg== X-Gm-Message-State: APjAAAXgIrs//tGsUBBlB7BK++KtTH5y4tc9lj3Mose/D6wpQWCUx6oQ XJIhK9IB6yTA1baIGrPhrBk= X-Received: by 2002:a65:6098:: with SMTP id t24mr13477929pgu.95.1573286106695; Fri, 08 Nov 2019 23:55:06 -0800 (PST) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.gmail.com with ESMTPSA id p16sm9531415pfn.171.2019.11.08.23.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 23:55:06 -0800 (PST) From: Chuhong Yuan Cc: Hans Verkuil , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] media: si470x-i2c: add missed operations in remove Date: Sat, 9 Nov 2019 15:54:57 +0800 Message-Id: <20191109075457.29930-1-hslester96@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 7541698a0be1..f491420d7b53 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c @@ -482,6 +482,8 @@ static int si470x_i2c_remove(struct i2c_client *client) if (radio->gpio_reset) gpiod_set_value(radio->gpio_reset, 0); + v4l2_ctrl_handler_free(&radio->hdl); + v4l2_device_unregister(&radio->v4l2_dev); return 0; } -- 2.23.0