From patchwork Fri Sep 7 13:07:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 1422051 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 0CD083FC33 for ; Fri, 7 Sep 2012 13:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753057Ab2IGNIb (ORCPT ); Fri, 7 Sep 2012 09:08:31 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38197 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752249Ab2IGNIa (ORCPT ); Fri, 7 Sep 2012 09:08:30 -0400 Received: by wibhi8 with SMTP id hi8so1743694wib.1 for ; Fri, 07 Sep 2012 06:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=QozfB0YiB3ZM5xaYKXRIVMlbvQ5deWlxaKZYccfkh2o=; b=JFvbbn/4JR9jh1xcI2OQxtxKTcKLBp5Pr63zpO7rB+4Oz3KudmQ1SwiuxOGbIb2T+u yk0JEmoDvAr+i+zVpww58ZixGHfAcY8xBB6QQ92nvfxDF1wztnyzh+vUZGV8tsOTsWrX 2BnwQaUFOFd1rX94BpjcoJQkSh76W9VIgxfgGCAi5e6e/e6qrCCfxk9ijcq/aGz6EQDY 6xHTqQw+N0QTHYsM8fpBOTNq6GfmMdLAX4Q7YigBjkRG42UOlTmJBXlcsYwRM/uDhv1M AlNEiVrJYCNAC5PRKBhYsel2GF93iv2hoGKV1DKOrJxVtdMhpcI3WBB1Igm7802+6piI ZDxw== Received: by 10.180.81.165 with SMTP id b5mr53128978wiy.17.1347023309430; Fri, 07 Sep 2012 06:08:29 -0700 (PDT) Received: from ace.home.fr ([132.227.100.38]) by mx.google.com with ESMTPS id eu4sm9599379wib.2.2012.09.07.06.08.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Sep 2012 06:08:28 -0700 (PDT) From: Peter Senna Tschudin To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, Peter Senna Tschudin Subject: [PATCH] Unregister device and unlock mutex before exit when error Date: Fri, 7 Sep 2012 15:07:15 +0200 Message-Id: <1347023235-10569-1-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1346775269-12191-5-git-send-email-peter.senna@gmail.com> References: <1346775269-12191-5-git-send-email-peter.senna@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Peter Senna Tschudin --- Depends on patch 14167: http://patchwork.linuxtv.org/patch/14167/ [PATCH 1/5] drivers/media/platform/davinci/vpbe.c: fix error return code drivers/media/platform/davinci/vpbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 2e4a0da..3057030 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -648,7 +648,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) ret = bus_for_each_dev(&platform_bus_type, NULL, vpbe_dev, platform_device_get); if (ret < 0) - return ret; + goto vpbe_fail_v4l2_device; vpbe_dev->venc = venc_sub_dev_init(&vpbe_dev->v4l2_dev, vpbe_dev->cfg->venc.module_name);