From patchwork Sat May 8 02:28:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 432565 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp861534jao; Fri, 7 May 2021 19:28:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVSan2WGigZvJr0NcHVRtuO6sz3b9fHjv8ptvWZT3PnXQvRSQyEBXW3BQjm2I0GXN5kdcM X-Received: by 2002:a17:906:a0d4:: with SMTP id bh20mr13453592ejb.348.1620440937120; Fri, 07 May 2021 19:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620440937; cv=none; d=google.com; s=arc-20160816; b=zA4aBs9wG64nD7P5eDje8dlV5ulV9GuzDEUAsQbItxxRKrtJ0Y7ucPUixABw1pbPFo 3F6MVTpj9ltErbXUOCHPUwAQBWg+5+G0K2HbfIigpPuVPKnK8HcKD9F1fRtxex71c1rp L0LMgPaUy62jKB/YHXMde8Ok8rurWeU6sRnCGLQKWyEVETgXQhqlF+0EoR1mDJLFklSS ywBmtyleEcJaAAqSKM+wP96HFFhESKq8vRlRAEotuuBm5Nng95kgsIY375j8Vyv/ls8Q QUhpAUhpPNtOSSY0eW8NRYtAsNnG8vTFt87b7VosS8vcBEr52flYFY4iQRkbHwrkbBcz VxGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uf2/yscQPOLd7sqFUTCiV5HHHUZU0Suhb8TJZZX86zA=; b=jnTlqWtq+GUFxXZOrkRXyR4xT5AoPU7KDTBX8r34Gm0iIWwHcnwR5K9qFzFP3Id3Sm 2v+ORyFi2uH8OiqXIbufso+GgfGKMwlev8ZmkYpXk1tJLl2EeO++zDr6Kw3Pjpt3vvKk 72GRHRMv0d6Jg6nRL1ukLrqj2khrVScupGlPqu3k6KlZ5I2JV/0cZZe3t1CL+tYBXrp5 3f7x1rYByqrcWb7DaR/GZct3R2QM3XnmwV/N5pBwfk2YsTEPZEFnEkY3cbPUi4KKzzup IJ1whjZYbaGlXLlKZNoKXBRoP4Swa4+pPMkOkLoAyzw9+Ld8l9ye8L6V8F3nH5nNcSwk 9sUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si5899306ede.388.2021.05.07.19.28.56; Fri, 07 May 2021 19:28:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230312AbhEHC34 (ORCPT + 17 others); Fri, 7 May 2021 22:29:56 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:17595 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbhEHC3z (ORCPT ); Fri, 7 May 2021 22:29:55 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FcWQd11MGz16LLD; Sat, 8 May 2021 10:26:17 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 10:28:43 +0800 From: Zhen Lei To: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jeykumar Sankaran , linux-arm-msm , dri-devel , freedreno , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] drm/msm: Fix error return code in msm_drm_init() Date: Sat, 8 May 2021 10:28:36 +0800 Message-ID: <20210508022836.1777-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 7f9743abaa79 ("drm/msm: validate display and event threads") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/msm_drv.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1 Reviewed-by: Dmitry Baryshkov diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index e1104d2454e2..ebd856dde1f1 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -523,6 +523,7 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv) priv->event_thread[i].worker = kthread_create_worker(0, "crtc_event:%d", priv->event_thread[i].crtc_id); if (IS_ERR(priv->event_thread[i].worker)) { + ret = PTR_ERR(priv->event_thread[i].worker); DRM_DEV_ERROR(dev, "failed to create crtc_event kthread\n"); goto err_msm_uninit; }