Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp282079ybt; Tue, 30 Jun 2020 21:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbtMZbMu8+ZsbRlBuFU3ihRned+O/EmkUYL5YiX2ubsnhgSTy0h9u3HPJvt+uAI34BsmTz X-Received: by 2002:a17:906:57da:: with SMTP id u26mr21845106ejr.157.1593576766189; Tue, 30 Jun 2020 21:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593576766; cv=none; d=google.com; s=arc-20160816; b=J01CKWIE7wP8XVZNBjmmunkwYf74WexZgICv4dT+kO4SeW0BULMrlJTkbkHEL0Wsi1 v2Tm5Y3HiK0M9NemBJC/o33OhZW1ZOxj1/9V+hHFC/TPdJ2sSwsFsQVrZ4a1TZ5X1nvF gXCE32/fF2v0vhdZ4BcvweSYPo5ZPtWB9FPlrWP/3YO3UoQzBHSW8nPqQjuJRFQmV9HJ k8Twfebl9cNIX9q80ICGmyVZd9dMbjLWhmbWZxtfiAYS5ICWRrr7pIAF6dNl6/UaafJY 45dIM/TFAUtzCwJi0/VLN1CSaZASj1ITCZuUl2NjkJcz94aIq6XdJF7/0xf1wcbr7BAy ccPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=pEtc5Qy29SNq8Di6oBBb7H6yGBTTUjEihpiGegJ0eO8=; b=sq7eqDHOb9uOJY0GRz+rPfXMcNxm9u544SCYQMNiIFha2BHZN1kJ/QSZjqh00E2xXQ GPsQD9W26ypmhG0ojr8/OSNZYLSPRHkdcd97HlnQeyonhwryiRjuKfT/+5EL6mrNoo+i niWYdERdpNCJzMrIQ7ZZQ/7tE6EqYrBzCh3xTcQAlobDrjJ0SKppJ9rUmrGFsmNHT3vR 0nWQ9fAJ+AX9qJfr703lg8XNWKvNiETpc1N+HgpvXXuOS+0sbQRBRcWwmVezWEo8PhGT AkM1YH3PD/OlBWpvd2ulpnX9NClLhX1GOUlOYJsf9pdhGltfZAEcIlmOnpmvH36NSchd oVQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si3133968ejy.226.2020.06.30.21.12.08; Tue, 30 Jun 2020 21:12:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725771AbgGAELo (ORCPT + 99 others); Wed, 1 Jul 2020 00:11:44 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:37092 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725263AbgGAELn (ORCPT ); Wed, 1 Jul 2020 00:11:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0U1ElaLe_1593576699; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U1ElaLe_1593576699) by smtp.aliyun-inc.com(127.0.0.1); Wed, 01 Jul 2020 12:11:40 +0800 From: Tianjia Zhang To: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, ddavenport@chromium.org, zhengbin13@huawei.com, sam@ravnborg.org, kalyan_t@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, tianjia.zhang@linux.alibaba.com Subject: [PATCH] drm/msm/dpu: fix wrong return value in dpu_encoder_init() Date: Wed, 1 Jul 2020 12:11:39 +0800 Message-Id: <20200701041139.92191-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A positive value ENOMEM is returned here. I thinr this is a typo error. It is necessary to return a negative error value. Signed-off-by: Tianjia Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 63976dcd2ac8..119c89659e71 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -2183,7 +2183,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev, dpu_enc = devm_kzalloc(dev->dev, sizeof(*dpu_enc), GFP_KERNEL); if (!dpu_enc) - return ERR_PTR(ENOMEM); + return ERR_PTR(-ENOMEM); rc = drm_encoder_init(dev, &dpu_enc->base, &dpu_encoder_funcs, drm_enc_mode, NULL); -- 2.17.1