Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp654806imm; Fri, 5 Oct 2018 09:33:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV62JXCPb/yesbRT/02I4ABPlxgNjE4oSEb1LI4PMSnpiYt2x/WBat77Ia/y3eixmCmTwuh2f X-Received: by 2002:a63:9507:: with SMTP id p7-v6mr10984158pgd.449.1538757237188; Fri, 05 Oct 2018 09:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538757237; cv=none; d=google.com; s=arc-20160816; b=oFYa33zLuNm9Nm01ULmwBbetz2Bona9NCQvFRFVI4qxwDzAMwwza+6RMJtRtkXjXkw NOTN718D5Xk/5slJyTUllHgT+a2cyj0CGX9LK/yKm9XidfdK1BjeVwW6Oh9oev5N7bQg mcQylNBJkMcl1fRF27jSJuuGXxmhUXQqtk+Rfy+URSrFsSk5qBUkmL/jFnXpp6x3gFiM kBNmtINeoxK0iFtzV3aW9dhfe4d88+o0k/u3iZ2dNXQdevwbgGNhsc2VujcI7WLFPs1K VwgJ9M856orljdfSLpcJcS2S+f7ZpGczA6S7vVgnG1EbkEpuemEZrC7+fkjucvDN3Z52 VcxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Q3dY8fwHiy23SewjlvSrGQam9L4cpQHq1n00c3Tn+rA=; b=CVcbC0/fre42RHpVd028xQOVEpjL6kTrBEtTOan62Bl1elMddH8zK7zTr5MxGXICYN 6hPxD9YzQoW4J1LeF4nHCSGv5z5q6FEo3bGNgt8WIByBnUXSLAuIwfqHyu6NOsytsdNh Mu8Xnv1jfTXP+VkBQiwG6ZbDpsskB6iACki+REG6A6YFLFHJaUuc2kMdWvAfPxRnF/XU AKlAmusKWrBs4sihhcKug/iyXyIA6ceJ3Hvw7SbDDXs0ZL7ZZRFLpWrRSQnO+GLrNeJZ 4y2nKwavRXBYmz/HNdzYS0VwHbq/5YkiaPeCNa7ts72PSN/+XRytkDJv3k9Zg00SznBe ju6Q== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14-v6si8822553plo.208.2018.10.05.09.33.41; Fri, 05 Oct 2018 09:33:57 -0700 (PDT) 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; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728972AbeJEXc5 (ORCPT + 99 others); Fri, 5 Oct 2018 19:32:57 -0400 Received: from mga01.intel.com ([192.55.52.88]:23209 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJEXcy (ORCPT ); Fri, 5 Oct 2018 19:32:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2018 09:33:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,345,1534834800"; d="scan'208";a="78782250" Received: from glacier.sc.intel.com ([10.3.62.55]) by orsmga007.jf.intel.com with ESMTP; 05 Oct 2018 09:33:25 -0700 From: Rajmohan Mani To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Sakari Ailus , Mauro Carvalho Chehab , tfiga@chromium.org Cc: Rajmohan Mani Subject: [PATCH] media: dw9714: Fix error handling in probe function Date: Fri, 5 Oct 2018 09:22:17 -0700 Message-Id: <1538756537-35340-1-git-send-email-rajmohan.mani@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixed the case where v4l2_async_unregister_subdev() is called unnecessarily in the error handling path in probe function. Signed-off-by: Rajmohan Mani --- drivers/media/i2c/dw9714.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c index 91fae01..3dc2100 100644 --- a/drivers/media/i2c/dw9714.c +++ b/drivers/media/i2c/dw9714.c @@ -169,7 +169,8 @@ static int dw9714_probe(struct i2c_client *client) return 0; err_cleanup: - dw9714_subdev_cleanup(dw9714_dev); + v4l2_ctrl_handler_free(&dw9714_dev->ctrls_vcm); + media_entity_cleanup(&dw9714_dev->sd.entity); dev_err(&client->dev, "Probe failed: %d\n", rval); return rval; } -- 2.7.4