From patchwork Fri Dec 20 22:23:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 3392161 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84FB7C0D4A for ; Fri, 20 Dec 2013 22:24:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C847C20647 for ; Fri, 20 Dec 2013 22:24:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C957206D7 for ; Fri, 20 Dec 2013 22:24:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848Ab3LTWYY (ORCPT ); Fri, 20 Dec 2013 17:24:24 -0500 Received: from mail-we0-f179.google.com ([74.125.82.179]:42435 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636Ab3LTWYW (ORCPT ); Fri, 20 Dec 2013 17:24:22 -0500 Received: by mail-we0-f179.google.com with SMTP id q59so3043553wes.38 for ; Fri, 20 Dec 2013 14:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zKrDer2IF7ltfU/vL/gqgOSZXAY++4K2HR73rnD9Etw=; b=w8J/HjqCbdQ1bxWIPYF/kfJcrNDcG38mo25iT9NR5YOwrXfGw4Zx0Fv+MDSvDh2S1g 9P4XoMex5cTwogX01cA5DO8f+IYsxfad5F7jwUi/8347A0DCKUOV/A8fTwydQ4x6Lkdj JtZb2ejuFRDxAhybwZ2dv9ogfxsXMPItif3+rbmwkGZiaP5enpsRgbt0psZ3HYzyTvcs sjLEwHBMmbAzSg8iBBbKLPHvzi+fw/xdFiTZTOBxYrjq8eU7IUdqdFLPDSaZH1yI8i9Q SoqPCTDCT12hZGSLEVdXqCxbQ+oOcVlrlGM77xy1k+dh6U+FaOpX5OlqkLPhypA82gel NAfQ== X-Received: by 10.180.228.132 with SMTP id si4mr9832877wic.2.1387578260888; Fri, 20 Dec 2013 14:24:20 -0800 (PST) Received: from localhost.localdomain (093105185086.warszawa.vectranet.pl. [93.105.185.86]) by mx.google.com with ESMTPSA id xl18sm19612162wib.9.2013.12.20.14.24.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Dec 2013 14:24:20 -0800 (PST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH 4/6] exynos4-is: Correct clean up sequence on error path in fimc_is_probe() Date: Fri, 20 Dec 2013 23:23:25 +0100 Message-Id: <1387578207-17625-5-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1387578207-17625-1-git-send-email-s.nawrocki@samsung.com> References: <1387578207-17625-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The memory allocator is being initialized before registering the subdevs so reverse the cleanup sequence to avoid trying unregister not registered subdevs. Signed-off-by: Sylwester Nawrocki --- drivers/media/platform/exynos4-is/fimc-is.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 9770fa9..8cb70c2 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -867,10 +867,10 @@ static int fimc_is_probe(struct platform_device *pdev) err_dfs: fimc_is_debugfs_remove(is); -err_vb: - vb2_dma_contig_cleanup_ctx(is->alloc_ctx); err_sd: fimc_is_unregister_subdevs(is); +err_vb: + vb2_dma_contig_cleanup_ctx(is->alloc_ctx); err_irq: free_irq(is->irq, is); err_clk: