From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD89A1119B for ; Thu, 24 Aug 2023 14:54:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 414E5C433C8; Thu, 24 Aug 2023 14:54:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1692888873; bh=DFYMHAlB036MAS++I5Gow5f28V5bYH51Jc0vzwctZH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O9DzJddbaLA6/t9yiw/Mwh+rmJc64hyRrPasXlwgRgGXh1V6CCApuUQtb+HPnG/2V g3F2zOXKFhOghaAdU3pvkh67p5iQ7gB4CuUzzpmVlB/CIpFJm3NCY3w6qOqPTj0qLu yDnSZ438KN4eWoZr0pH6Iqugf7NeyaMurfUEtzgg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuanjun Gong , Helge Deller Subject: [PATCH 5.15 072/139] fbdev: mmp: fix value check in mmphw_probe() Date: Thu, 24 Aug 2023 16:49:55 +0200 Message-ID: <20230824145026.800881344@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230824145023.559380953@linuxfoundation.org> References: <20230824145023.559380953@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Yuanjun Gong commit 0872b2c0abc0e84ac82472959c8e14e35277549c upstream. in mmphw_probe(), check the return value of clk_prepare_enable() and return the error code if clk_prepare_enable() returns an unexpected value. Fixes: d63028c38905 ("video: mmp display controller support") Signed-off-by: Yuanjun Gong Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c +++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c @@ -518,7 +518,9 @@ static int mmphw_probe(struct platform_d ret = -ENOENT; goto failed; } - clk_prepare_enable(ctrl->clk); + ret = clk_prepare_enable(ctrl->clk); + if (ret) + goto failed; /* init global regs */ ctrl_set_default(ctrl);