Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3085040rwb; Mon, 15 Aug 2022 17:45:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ZsrL4IMp20+Y6nuowxZqwPlsPUp2qoXGPBmjf0Gzs66m/2l/NskYv0g6lmZI8EEpcq88b X-Received: by 2002:a17:907:b0d:b0:730:aa17:a0b7 with SMTP id h13-20020a1709070b0d00b00730aa17a0b7mr11865750ejl.661.1660610746092; Mon, 15 Aug 2022 17:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610746; cv=none; d=google.com; s=arc-20160816; b=wa4aRqJoGnBaV+GKXHdpw1+srMpxIlSihH+vkLENoNuUgi54gQsPdzS4DcHDy4Aelv u0GUyWfu/MntC1Cltzdpb3HH9NWuy9zP4bXBJ3koNnnR9LzUs7b2Pl2c3rVF4b1FaxCr FwEYvHaDok6LHlXj4J5JaFzY4NNmzV8T6JHJFQjVMGe3PBZ5CEvUzaY6Odz/YDiUcw9H pUS1VcT/Fjbz0QXWiiPIUCfnze3OA91CwRCp/J1Vwak15GSncflMDTEIEZLmCZsq3fLg 77z6qnA32+ATnkaCykHlSu3V+nRicQIp2B5X/tojs5mcWDicQceoTMGTmhhdD7NIezEd yLnA== 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=f1R/74GxgtH7WdAsatjXYFjc+GUtm4wH8Tn9iycvJWo=; b=WU0795iyYUpDFmx/5BvJIiJNbU6J/YFaN2sIaenMDpN7kXRen2doUeoD9ef8EOfGCz l+3H5nJ6uAIMySDLpjaiLB7qfp5mfHyjlAOgJPxFEMB10xZpK72FcVokRYqbL4yRujoD fgqPYxu4BggjEwwdwlhGkiY+9qskG5rJ97bhOfGcn5vQ8vF0jNiumU9y05DWWj1ByI6H Yh5ePzBfj6dgRhaCj6CADGTaFdUrVsbo+wSS+Nzc6zG9IgID/a0lH1aEP7hLbwVnJlpa 4lbfIMJlM54sg8nXeit9ObfxW+mTmC+VlX8V5TtA0I17PZOZE0XzNAsS1GJSVbU3klW9 xcKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wHKxf8d0; 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 oz11-20020a1709077d8b00b007308ab90efbsi9153992ejc.776.2022.08.15.17.45.21; Mon, 15 Aug 2022 17:45:46 -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=wHKxf8d0; 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 S1355642AbiHOX5d (ORCPT + 99 others); Mon, 15 Aug 2022 19:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355385AbiHOXwB (ORCPT ); Mon, 15 Aug 2022 19:52:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CEAC92F6E; Mon, 15 Aug 2022 13:16:48 -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 15FBBB8115B; Mon, 15 Aug 2022 20:16:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47133C433D6; Mon, 15 Aug 2022 20:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594605; bh=MEBQGLR4Wi8YUObvifBBBpQoQcSMmdCnvx59pobyrQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wHKxf8d0kxwoQ9MwisoKksDJPeHs+QQmC/gi05Ak+XqgrYEH4bg1dR3WEoWmqM5TX Zgi7Q7tfP/fMCxQeqB6uaLP1XSX5GpAql3+ecG+MACnwrns431rjGVP9CZa3zVIiAX bGHTODN3LjlNNATqHwdTCrMpQUQSjjgXGp503ZqU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Andy Shevchenko , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.19 0501/1157] media: ov7251: add missing disable functions on error in ov7251_set_power_on() Date: Mon, 15 Aug 2022 19:57:37 +0200 Message-Id: <20220815180459.734281331@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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: Yang Yingliang [ Upstream commit 7a9795b31049b7e233d050a82b00094155a695c7 ] Add the missing gpiod_set_value_cansleep() and clk_disable_unprepare() before return from ov7251_set_power_on() in the error handling case. Fixes: 9e1d3012cc10 ("media: i2c: Remove .s_power() from ov7251") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/ov7251.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c index 0e7be15bc20a..ad9689820ecc 100644 --- a/drivers/media/i2c/ov7251.c +++ b/drivers/media/i2c/ov7251.c @@ -934,6 +934,8 @@ static int ov7251_set_power_on(struct device *dev) ARRAY_SIZE(ov7251_global_init_setting)); if (ret < 0) { dev_err(ov7251->dev, "error during global init\n"); + gpiod_set_value_cansleep(ov7251->enable_gpio, 0); + clk_disable_unprepare(ov7251->xclk); ov7251_regulators_disable(ov7251); return ret; } -- 2.35.1