From patchwork Thu Apr 18 21:35:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2462491 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 206213FCA5 for ; Thu, 18 Apr 2013 21:36:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936429Ab3DRVf5 (ORCPT ); Thu, 18 Apr 2013 17:35:57 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:65349 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936199Ab3DRVf4 (ORCPT ); Thu, 18 Apr 2013 17:35:56 -0400 Received: from axis700.grange (dslb-088-077-162-170.pools.arcor-ip.net [88.77.162.170]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0Lno8B-1V21OG1nep-00hsLi; Thu, 18 Apr 2013 23:35:55 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id BB89140BB3; Thu, 18 Apr 2013 23:35:54 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1USwUk-0005dC-Dh; Thu, 18 Apr 2013 23:35:54 +0200 From: Guennadi Liakhovetski To: linux-media@vger.kernel.org Cc: Laurent Pinchart , Guennadi Liakhovetski Subject: [PATCH 02/24] imx074: fix error handling for failed async subdevice registration Date: Thu, 18 Apr 2013 23:35:23 +0200 Message-Id: <1366320945-21591-3-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1366320945-21591-1-git-send-email-g.liakhovetski@gmx.de> References: <1366320945-21591-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:QoitQC23E16pluvDXUOI36vfUeQJQVuZo26JRBsuEFN PMOsYsu/0m5IzoBGgNEq7NmQmuy9I6zXlFlauNsPJXLMwIfjFs /s1vh9Kg14uVODWBBFKsy2Ew+lu0La73X4sYMaX8edtaBOBTAs Gy24DUmYhiTKO8H4/v1235R6gYlJ+LJY3Llp7Yrsb1rB1PY/x7 e3fI72rNl1qiMjm/6Q2bFwnUykNbunJ9PGE0xJsb/PhP2RXckl lkzn5Op4ghov0nXSBHb1bhk4nSIFLrraqOJwcG7wa9Tbab3LJT AS+wfmlfv1UcRPLME2d5Z1qrvdCHDuHQWkdUuXh/Jp/IDtatC8 Ic9F+sqnAJgwFsp30av2P5mOemXyJI8EoJy5n0Spmdsq284VoG 5iYSj7nPIQrLg== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org If v4l2_async_register_subdev() fails, don't skip the clean up. Signed-off-by: Guennadi Liakhovetski --- drivers/media/i2c/soc_camera/imx074.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/media/i2c/soc_camera/imx074.c b/drivers/media/i2c/soc_camera/imx074.c index c0eed84..23de859 100644 --- a/drivers/media/i2c/soc_camera/imx074.c +++ b/drivers/media/i2c/soc_camera/imx074.c @@ -472,7 +472,9 @@ static int imx074_probe(struct i2c_client *client, if (ret < 0) goto eprobe; - return v4l2_async_register_subdev(&priv->subdev); + ret = v4l2_async_register_subdev(&priv->subdev); + if (!ret) + return 0; epwrinit: eprobe: