Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1086353ybt; Wed, 17 Jun 2020 23:31:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1nCZ9HzB1rbrXlKj9vLluxPX09qqPT8Mp9GEyCCu4O1c9u/Bzl2T9dytM5A2tp8bPAKR7 X-Received: by 2002:a17:906:fc20:: with SMTP id ov32mr2406795ejb.531.1592461912589; Wed, 17 Jun 2020 23:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592461912; cv=none; d=google.com; s=arc-20160816; b=tYYBpu+KMpbKyTO/MWW49Lh/r8F8iwmdve6mNbtbKdDRPMev76TxDEZ1oUBEiEjB9p d1t8XXBKpelfvmFQ94HidX3WB/gzI2Zc961SnWpOCK5VwTrjhq97LLWDnfCKzWmymPfV 1oc3qUtv+ka+B0x/yNQyBz8KeuAvCHwFQWeVjO4MGIf2RZJRHa1V3gk4cxsqFtVwMhzH vl7iAlnmRQXoNcOz1M/qnlJ4j1F+cFNKMPeOLmIKxoaNGHqRP0er217Ypo+v41+ybDJp l/mqcNadSb60zfeb+GMdEf/2KO/IYlF5ef002yJFPuwC4DLDCRyrItoWlZc2pfwUH//Q W/5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ixKEzZ4seocliB9iorJTzHw1Qa+qu5LRM5ZkngPdaeE=; b=kkeh/altbwkyhkNkvdx6+r4sqEE8o0PfFj1eUS/WO3NziA4zVCaAhvngLJjnYViuRH B9MXJjTuDg6OVlBRoNjMInOR4COfSVAkC+dlbRdrVHouLakLOWCV8DdvZFUxcrWqBxG/ zjV02oKE5eb04sMZCyzkqoqlYuD7zLgHppGAU9dWoC43KTdIzo57p+ZZF7ftUAdQ+fN7 BvK7uAoooF4x8DNNVK/Sw3vvGF80rPb2DaXCtKhsB9ZIyYp74L+U93B5HbzRivWMAMwc cdSBL6XtM+FxN+jsHgqPGA76hZkCF+P4UmKXQtv0BZntZAWNJxom//EPbP7rS4sOM5+W fqZQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si1294699ejx.148.2020.06.17.23.31.24; Wed, 17 Jun 2020 23:31:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727010AbgFRG32 (ORCPT + 99 others); Thu, 18 Jun 2020 02:29:28 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6280 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725898AbgFRG32 (ORCPT ); Thu, 18 Jun 2020 02:29:28 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 828E08A575EC6339027F; Thu, 18 Jun 2020 14:29:25 +0800 (CST) Received: from huawei.com (10.67.174.156) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Thu, 18 Jun 2020 14:29:14 +0800 From: Chen Tao To: , , , CC: , , , , , , , , , , , , Subject: [RESEND PATCH] drm/msm/dpu: fix error return code in dpu_encoder_init Date: Thu, 18 Jun 2020 14:28:03 +0800 Message-ID: <20200618062803.152097-1-chentao107@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.156] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to return negative error code -ENOMEM with the use of ERR_PTR from dpu_encoder_init. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Chen Tao --- 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 a1b79ee2bd9d..a2f6b688a976 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -2173,7 +2173,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.22.0