From patchwork Mon Jul 12 06:09:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472960 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2680740jao; Mon, 12 Jul 2021 00:20:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuQAHLkFvrmsugCz+NkgRBJQYFEQqsRKBUiCwCs4ZhVEINC9vAu2Z8VxIwqxmRqRQdeQtc X-Received: by 2002:a05:6402:204:: with SMTP id t4mr62954615edv.34.1626074415206; Mon, 12 Jul 2021 00:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626074415; cv=none; d=google.com; s=arc-20160816; b=AA3XnS45NlsVNUmKaJgoIkQ+AzikGx0YNprha8omPQOx6l4wcSmKchIuafdfkJta9I J8B2yAf6t9BxnMPWwOjgsH9H6ygsehJr1O34bav1bRP2WdNMK5ntmqMtbA796hS5hf4T nIq925OQve/PujMXU/N06Xezn2q/s7RhC1hvLGydKHP1x5gcX1uJ2RlC+XT0E1rFLHDn PRoOTRcnfq0wVY4NgRbqsBi6GkYB1G+rzF4FQIquSqnOSrTIFoTkzVH+enOcOQtsVx2W Faz2KdmIFhiYvcGdn7EHMRNwKXUvnI3kNvK68PUsco/PFFI+JnvFUUn+cxGPg6sYeOBO dV7w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MeIp2yRkEqeQqMmBdoQSIE24W8WOnzDgp3cyR8j3eqU=; b=jyBSZNUElxxIIFsHHmH3FpLWLdyMX/IljmdB3VA1033Bg2LBgWDdsf0kSc80uzadbO /+6M5cL3dCus74wd+NGMmTpf0B8SUG2QDRztKrC0D4OKf31MHyOTiSi0vmxHPcUKlMXq eyr7y65FLfvoBAO2nM/aDyaMYOEi5Ladr6bt13qLtwMwjeXeTkAyKlQhA/k9dfCTk0AN vZx7EpmiA8opUW18kX3S7MTJJHn+JytncUGdQivsId9F/RDgcLqqkOsXA823XGYeHSMi DLcHyFEPh+K0XOqLxASXVMaCFwiw8tQWJ2ZpOr2PUSCelPfGhAu7aakSeLJiUvJGu4HX /how== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="OOY1U/eR"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si16909677edq.169.2021.07.12.00.20.15; Mon, 12 Jul 2021 00:20:15 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="OOY1U/eR"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237110AbhGLHVp (ORCPT + 12 others); Mon, 12 Jul 2021 03:21:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:56102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243523AbhGLHSK (ORCPT ); Mon, 12 Jul 2021 03:18:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 83A5161477; Mon, 12 Jul 2021 07:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074122; bh=RSKEnlCf6XJmeLc+I47Jc8RKXJiNoAiYlS21ygyBkBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OOY1U/eRGmpo7p2y/s1J/BJSBwA6NZ3GYrShBc82E1kYcE9xhoD0J3fUyw/HAsgfU CfQjOEYX/v3umZ+W0dzgI8dfl70gqZY50ZlVGdb3nAvyuAm6n4+7OV14aoH/jsg91o jluK6Ha0OBuh/6N/a0asda95xJMloDmTpcON23bs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Dmitry Baryshkov , Rob Clark , Sasha Levin Subject: [PATCH 5.12 471/700] drm/msm: Fix error return code in msm_drm_init() Date: Mon, 12 Jul 2021 08:09:14 +0200 Message-Id: <20210712061026.710433460@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit a1c9b1e3bdd6d8dc43c18699772fb6cf4497d45a ] 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 Link: https://lore.kernel.org/r/20210508022836.1777-1-thunder.leizhen@huawei.com Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/msm_drv.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 18ea1c66de71..f206c53c27e0 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -521,6 +521,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; }