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 965C811C83 for ; Mon, 28 Aug 2023 10:16:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16748C433C7; Mon, 28 Aug 2023 10:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1693217806; bh=HrBX1rclMjc37669V9luVBcGpA0yCLucmSpXIu4Wyyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xeC4/zes3Odjz69fPXR8gaL6cvnzSd2z1eezY1W6tPfBKhcIEWzWdgISusluFYtr7 hwPR2xXeMZnuoLXoqiiHvAhBhrjSSMKk398TE+dELkAPWm5Sc32jFac6UdS1HcVJb0 djT7s8tyh3/uhMReSH1BZbe0q0c5ksKsUgcrqITE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuanjun Gong , Helge Deller Subject: [PATCH 4.14 17/57] fbdev: mmp: fix value check in mmphw_probe() Date: Mon, 28 Aug 2023 12:12:37 +0200 Message-ID: <20230828101144.858438330@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828101144.231099710@linuxfoundation.org> References: <20230828101144.231099710@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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 @@ -525,7 +525,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);