From patchwork Thu Feb 9 15:19:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9565849 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 E5312601E9 for ; Fri, 10 Feb 2017 01:43:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D84292853F for ; Fri, 10 Feb 2017 01:43:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD2B328548; Fri, 10 Feb 2017 01:43:24 +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 756422853F for ; Fri, 10 Feb 2017 01:43:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 30D7B6EC07; Fri, 10 Feb 2017 01:41:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 620A46EB06; Thu, 9 Feb 2017 15:19:15 +0000 (UTC) Received: by mail-pg0-x242.google.com with SMTP id v184so539453pgv.1; Thu, 09 Feb 2017 07:19:15 -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=zm1hcUWehSniZN7uq/Js3zntdRMvZrj4+aWGTxlC55Q=; b=dA/D57shjt/0/GspQ8xlG5egb2RGIq+fMAZiwt3P8T6VruRQDF6NZ5abgNP4b53ffL cLKhlvNqaLO6XufPDlZUMoGcBeqDphtvaaDOpXlQxtp0Kf6h9F8ANXeucijt+gUNj6zQ qUWwUBvE8sQPPXq4R8E51v3tyoDiJ5lLXtd2x2FY6fsLMDEwuEzNMIQm3jiuH/V8iQ/m QC17+xvoSCTEdZ+hCWW/Dpn5f74cwZ/875H2shtOYzIeY8eJq1RFERzwwrrcVeDsPTBi +zfSeGDu/jfIasiMDZXR9/EYIlCbZ4XZzGAoN3MeqjrRNzLX7UYAa+x6o3A6IULX0q0n jHhg== 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=zm1hcUWehSniZN7uq/Js3zntdRMvZrj4+aWGTxlC55Q=; b=ihOUDUWLCez51zfku9HV0+rqG5pztFzdPvIK1NqYqbJHiCVZfJx0i9DPWpSj84l+yO icE6pXHhvIT5giP5wsRcWe2ToRYQDJnPWXTQ6NrPLxssEAv4mazxdGu8RrSE56id1i94 Q5hKVPR76FvA7wrXuLg+jV59tePQo7Nwe6YYO/fAEO+YvWFXomlY4qiC52sll0SUTvFR yYFL8fP4KaX1EMQr2BhJJ9Ju23Qu+xsj8zecBCTBymQLR7cMGNChGoUYec/E4gA70htg B6p3VCKREfcUkptjKA7zFTIg0NZ0nn3JqqZDVls4Ac2VR0MgqO2XzA6Sw1vP4km+1i1k fBYA== X-Gm-Message-State: AMke39lH5Wy3SZG4aT6RpHkOzmvsQebmTAo6tmlLeMTaOZzRYEs3Mawfrw1yIARa/ijtcQ== X-Received: by 10.99.175.87 with SMTP id s23mr4641138pgo.184.1486653555031; Thu, 09 Feb 2017 07:19:15 -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 l3sm30070037pgn.10.2017.02.09.07.19.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Feb 2017 07:19:14 -0800 (PST) From: Wei Yongjun To: Rob Clark , David Airlie , Archit Taneja , Hai Li , Rob Herring Subject: [PATCH -next] drm/msm/dsi: fix error return code in msm_dsi_host_init() Date: Thu, 9 Feb 2017 15:19:07 +0000 Message-Id: <20170209151907.28800-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 10 Feb 2017 01:41:18 +0000 Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Wei Yongjun , 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 error code -ENOMEM from the malloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/msm/dsi/dsi_host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 1fc07ce..4f79b10 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1740,6 +1740,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL); if (!msm_host->rx_buf) { + ret = -ENOMEM; pr_err("%s: alloc rx temp buf failed\n", __func__); goto fail; }