From patchwork Wed Sep 11 14:10:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2872901 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 2A834BF43F for ; Wed, 11 Sep 2013 14:10:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B5AE20364 for ; Wed, 11 Sep 2013 14:10:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5BCD201FD for ; Wed, 11 Sep 2013 14:10:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753973Ab3IKOK0 (ORCPT ); Wed, 11 Sep 2013 10:10:26 -0400 Received: from mail-bk0-f50.google.com ([209.85.214.50]:48725 "EHLO mail-bk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752763Ab3IKOKZ (ORCPT ); Wed, 11 Sep 2013 10:10:25 -0400 Received: by mail-bk0-f50.google.com with SMTP id mz11so3582475bkb.37 for ; Wed, 11 Sep 2013 07:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=N47YwWwRs1dxCuCgA+N/LOycjF+k/RMoIsER4bR9tL8=; b=k11fEp4ffMrImt7ms5sSYeSf03nhwqz/YqBkthP5Z+HDY+xk4BZbAjPtqhODtCMs9E su6mnS0fTExslT/uVzOQ8bPB0lsNiOzhFbxLrwS97Kiu+Em0WOH9zevb4AeshSYWX/Se F9wORC8K+4JDxxyHuDUS0xV4kzBrkc1deBICV1LEKQj+dkkcQ+6E/muTQlKRkPJr2rB6 bpqMvN6szZ2lNPZPg1b8rIsrj5wkNfSbanU+3UHhrmrOQ5UPJ9ybJ8wqdy1nq9RKeRzp hNTITepeqMa+PB9lHwTdTz0uCFRA7czFdbnAJhtvnAKpZxTO47cjCQ+oJgpaH3ZaFoC+ Urjw== MIME-Version: 1.0 X-Received: by 10.204.167.140 with SMTP id q12mr1670937bky.2.1378908624612; Wed, 11 Sep 2013 07:10:24 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Wed, 11 Sep 2013 07:10:24 -0700 (PDT) Date: Wed, 11 Sep 2013 22:10:24 +0800 Message-ID: Subject: [PATCH] [media] v4l: vsp1: fix error return code in vsp1_video_init() From: Wei Yongjun To: m.chehab@samsung.com, laurent.pinchart+renesas@ideasonboard.com, sakari.ailus@iki.fi Cc: yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org 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.6 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 From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-by: Laurent Pinchart --- drivers/media/platform/vsp1/vsp1_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c index 714c53e..4b0ac07 100644 --- a/drivers/media/platform/vsp1/vsp1_video.c +++ b/drivers/media/platform/vsp1/vsp1_video.c @@ -1026,8 +1026,10 @@ int vsp1_video_init(struct vsp1_video *video, struct vsp1_entity *rwpf) /* ... and the buffers queue... */ video->alloc_ctx = vb2_dma_contig_init_ctx(video->vsp1->dev); - if (IS_ERR(video->alloc_ctx)) + if (IS_ERR(video->alloc_ctx)) { + ret = PTR_ERR(video->alloc_ctx); goto error; + } video->queue.type = video->type; video->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;