From patchwork Sun Feb 5 16:00:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9556993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89CC76021C for ; Mon, 6 Feb 2017 01:25:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DAE520242 for ; Mon, 6 Feb 2017 01:25:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 728D626C9B; Mon, 6 Feb 2017 01:25:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 244D120242 for ; Mon, 6 Feb 2017 01:25:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CAB276E2AA; Mon, 6 Feb 2017 01:24:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5708E6E241 for ; Sun, 5 Feb 2017 16:00:41 +0000 (UTC) Received: by mail-pf0-x244.google.com with SMTP id y143so5116766pfb.1 for ; Sun, 05 Feb 2017 08:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Krf9Q1ObisbBOD1XcghPkcUoHOfu/qJDbAx1k5m1byg=; b=K6HYYmvBVlfu73qpmkRnYeb8znc94tgWib+swMT0BSV6JtTryauMYeV3WP2BIC51/7 g6R7aM+2ip+uCsVEFaVYchrOYBNVnC+ZDqs7WOAHE8PM7/WMThIx40lGwYAt6F1HfXea j6XpWqWfyP3vzq51YyvJh0jYK5mmEhod8IvUiM6fCNdcsum/xhOjfOMlyTXclaLgmjqw 4YfYq5H0E11eg4rF82H4Bwh/gWxCEEe7tBPGJjtuWvXS6Mq23Xtc53OMuS4/biTNxc20 2AIabQiOrsNI0OQdA6irnBICSDVTw1Mlt6hfyUaEBP035E6uS1qb01C1S9yifjuBHchc UGwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Krf9Q1ObisbBOD1XcghPkcUoHOfu/qJDbAx1k5m1byg=; b=PuR4eeqSOeXl6uDAwjHA6D5j2qQMUtaJwgbxPDk37gGVvmeaNeBS9xHqZPOCws3E36 siVDAGWaq/aUs/aR22H7Pg70JiDlL413UGYgDvMc6L3Fa7it2T5CYhfvA8Nxuop8Qxbq puE7ZfEWuUMMcyupg2SDNV4MINRhMApEFzwe45ynGFN0xCpYf18LMP3SXRSKMdecCvLd J4E/SnZ8sS260VndpAtLoufiW8rNITm71rJE94QQ+F8UCRbhWlwMhN8L+r3JyAP7enWU t/ZElv16TkYZeiyCh9nBSCJDjgoKQ2xrAJu9YIEYyEYmFBeE3q/1YKJevggd3VtLFDSL +zRA== X-Gm-Message-State: AIkVDXIF8aO/Iv0tfpW0Q1isQXWYxAdQHJe86UTdCg+4Gc6UXTyHyQiuH45h0C/ogv+vCA== X-Received: by 10.98.1.213 with SMTP id 204mr8425759pfb.61.1486310440953; Sun, 05 Feb 2017 08:00:40 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id y184sm82131444pfg.86.2017.02.05.08.00.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 08:00:40 -0800 (PST) From: Wei Yongjun To: Marek Vasut , David Airlie Subject: [PATCH -next] drm: mxsfb: fix error return code in mxsfb_load() Date: Sun, 5 Feb 2017 16:00:36 +0000 Message-Id: <20170205160036.7364-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 06 Feb 2017 01:24:20 +0000 Cc: Wei Yongjun , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Gustavo Padovan Acked-by: Marek Vasut --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index cdfbe02..28a75cb 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -221,6 +221,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags) mxsfb->fbdev = drm_fbdev_cma_init(drm, 32, drm->mode_config.num_connector); if (IS_ERR(mxsfb->fbdev)) { + ret = PTR_ERR(mxsfb->fbdev); mxsfb->fbdev = NULL; dev_err(drm->dev, "Failed to init FB CMA area\n"); goto err_cma;