Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883761rwb; Mon, 15 Aug 2022 13:16:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR4yu0JjLIgz6bvAWPaDpzg7SoMw2RwuORgelcn3UENrrIINspeRmXNq8iS8x5mkIw6AnCRp X-Received: by 2002:a17:907:3f95:b0:733:1e1f:d75c with SMTP id hr21-20020a1709073f9500b007331e1fd75cmr11446653ejc.727.1660594564070; Mon, 15 Aug 2022 13:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594564; cv=none; d=google.com; s=arc-20160816; b=lryBz+/lu0AWkIfMtjCzaWwyR97cwdNiEP4CKcn+Ke5idQdaDorIFsdaq8y7Op66ad nnPUB9fHP29OLl1UqVlpZYfeddIeS8EXYo4shFp4KBNPhs+9dPGV0l9AocX4guM0M4HU pfSyrzqy0sN+CwQhb9Fv5nAfd8517PRtG12g0vLbJHcrDy0N61sq8kuNJ5oHoqP2sH2I sLVzz/sdxdZdxFL2HoPt0WwIV9KjjHr0rKXZcHtYfvhexvA24NFBKzABb4JP9nrtuCUM BZn6AcO325WSbXyiWYeWTgw9FhSv6Dh9jT8afNySSa+z1JlIqnGo1SAjq3d2Oau3GL7A Zx4g== 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=MXua63exYnFscc0PqYZAC5L5Qpoy6NX/fTtdPT2Xn5k=; b=W2R7yXwbq8nxsyY/DMu0mhF3k5FwyF0YQyDlZxbjYyvn4SwWqjFqPmUv6iR9ZgRqo4 dSF3gGi6C+evEI5Pf1GLyf8AQUxsd2sGOPqlVPpijkvGc56Yl1emlh066feTu0rSMD7A M3/6JqHw5XlJk6HS+4y8Bs1d+s81UImfyOn7/i1Xv0ciw9oPT6WZTDNyVMZ+oJssfFhq N43OBdo9CbDn2dvAOnrBSJYM3Tgo2/P99J7ThwYXM9+OIEOVCdqt+x7uCA0fPiBqqknD dABW7xluEEU1MV8jgONGT5r5BnG7aakUNQZfzh+ZX2J+t6rFjILLGNjxnyqwg+Uh/iF6 CdvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NfCj/U8c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb35-20020a1709076da300b00732fa7c5058si7785897ejc.300.2022.08.15.13.15.37; Mon, 15 Aug 2022 13:16:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NfCj/U8c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S244326AbiHOSzR (ORCPT + 99 others); Mon, 15 Aug 2022 14:55:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244755AbiHOSvv (ORCPT ); Mon, 15 Aug 2022 14:51:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651AF474F4; Mon, 15 Aug 2022 11:29:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BE10CB81062; Mon, 15 Aug 2022 18:29:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1938AC433D6; Mon, 15 Aug 2022 18:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588178; bh=1epsVxATSZFmvE/+LKcAw9ma1DkPFnaS/bMMkv+nrm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NfCj/U8cOFFungxm+vXnFSAqYvm+mjwKp0tZAS4VUYJzVHK2YlurTltF/EaObT86u Fd8iNGrZWqL8jLJ74oKCaM3iTbenqZCe0tZmzbwsVprR2jMgGHKKKmn83HnbnucnQn 4VtvWpWdLv0PHsWefjEyENKpPVTGyy87i7IK73f0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Jian Zhang , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.15 292/779] media: driver/nxp/imx-jpeg: fix a unexpected return value problem Date: Mon, 15 Aug 2022 19:58:56 +0200 Message-Id: <20220815180349.760209981@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Zhang [ Upstream commit 5b304046a81eda221b5d06a9c62f7b5e45530fa5 ] In function mxc_jpeg_probe(), when devm_clk_get() fail, the return value will be unexpected, and it should be the devm_clk_get's error code. Fixes: 4c2e5156d9fa6 ("media: imx-jpeg: Add pm-runtime support for imx-jpeg") Reported-by: Hulk Robot Signed-off-by: Jian Zhang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/imx-jpeg/mxc-jpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/imx-jpeg/mxc-jpeg.c index aeb3704cfff0..984fcdfa0f09 100644 --- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c @@ -2108,12 +2108,14 @@ static int mxc_jpeg_probe(struct platform_device *pdev) jpeg->clk_ipg = devm_clk_get(dev, "ipg"); if (IS_ERR(jpeg->clk_ipg)) { dev_err(dev, "failed to get clock: ipg\n"); + ret = PTR_ERR(jpeg->clk_ipg); goto err_clk; } jpeg->clk_per = devm_clk_get(dev, "per"); if (IS_ERR(jpeg->clk_per)) { dev_err(dev, "failed to get clock: per\n"); + ret = PTR_ERR(jpeg->clk_per); goto err_clk; } -- 2.35.1