Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2133644iof; Tue, 7 Jun 2022 20:52:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye/jtl9pEDddObLaTPH5CURYLXfey6HlT3V7W4kFxgCTD15bpR90O1AxITLi2fv4PI+ykC X-Received: by 2002:a63:2d0:0:b0:3fd:d5d8:b0bf with SMTP id 199-20020a6302d0000000b003fdd5d8b0bfmr10031823pgc.59.1654660354637; Tue, 07 Jun 2022 20:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654660354; cv=none; d=google.com; s=arc-20160816; b=q91yVWCgToBc32Y2e4vZmgfxfDEpSkYUYm6gds54oCQ0Anduor3kNra/bGzB4FKpql MrAFrhxeuqu6g1ByTXZKJEVkdCE9Yca1pNITmwQhwmPzQJemha36rY20W9ZV+IwYxND6 GC+IqE1OgU76Gf2pZpc2r0t+03nu10Ji2/SXZu7jo9Zj5EDkH1OWQeg9uGfE6a3Jqd+Q C5RPo/hgoNiXv5XszSnUNIRK62Ky51TT8/jBSrMdy4cBflKEZbh5SniGob7NWcnIioNP rzBbNCpOkEnxR2DWpRIsEmfvuxVOlngkU7Puupw0dJsn3pknstslbipToMFgnCRjrbPF iT7g== 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=nwONx/tIdnB/6jBfhAhdKn99xT3KinQFGzJso6vz0hY=; b=n/vgD1YaDlYx2/ORrpP0i9RWQb7hJEab1VWNvtuvCfgyxr9RVnXGddJitjFpkZ2QQw bWtiPJbf64O6wq2thFTxJsj3yYO0P3gQFDeuTZ0cPTkgNmKr3tUVhYgdsCgMhPj4IIaM iwb80xbGJ7xqDj4TMFJ3PFkN8Fxb4WPTpULob+Wj/SJhKpmgwzZ7mCuu++HerjkA5A3R KBubR973RjsRi3eZ2UN9iFC+9Z+EUw5dDeJNDWP5m/Pr/Q4Pts+1z61skRu8EmFtezOi MaSlNyIchGaNTSSWvccUEDMsovaRFC9lNDjBpzB8KGRFkA1ka3AKkRGXAyyQpyzA4SMY AOXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ERuyAXOk; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u10-20020a6540ca000000b003fda87c82e3si2687859pgp.691.2022.06.07.20.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:52:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ERuyAXOk; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7541334EC45; Tue, 7 Jun 2022 20:13:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384485AbiFGWOn (ORCPT + 99 others); Tue, 7 Jun 2022 18:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380083AbiFGVL2 (ORCPT ); Tue, 7 Jun 2022 17:11:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 408F621761E; Tue, 7 Jun 2022 11:53:04 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4FFBE6156D; Tue, 7 Jun 2022 18:53:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 622B5C385A2; Tue, 7 Jun 2022 18:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627983; bh=iKlBYoUEHHSKLj/FQ6yF2o4GA7+S+LJ6Nw0AmRb3NAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ERuyAXOkq3tLSqDl7WOzpH515lSIcCOJ4aA3U7ijzCGT9WkndADUpkPkdB8r3bLBz 7L2zOlflLPU/Xt7A3BbY+RdRThD5oUaE+6Jn6i75HQTwBW9yNCMrfjEUPirSirBVFA F2nDo+/j/VienaKkixB8+KRSaPvrTFPEU5uRRPf4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.18 165/879] media: ccs-core.c: fix failure to call clk_disable_unprepare Date: Tue, 7 Jun 2022 18:54:43 +0200 Message-Id: <20220607165007.498129095@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Hans Verkuil [ Upstream commit eca89cf60b040ee2cae693ea72a0364284f3084c ] Fixes smatch warning: drivers/media/i2c/ccs/ccs-core.c:1676 ccs_power_on() warn: 'sensor->ext_clk' from clk_prepare_enable() not released on lines: 1606. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/ccs/ccs-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 03e841b8443f..7ae469caf990 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -1602,8 +1602,11 @@ static int ccs_power_on(struct device *dev) usleep_range(1000, 2000); } while (--retry); - if (!reset) - return -EIO; + if (!reset) { + dev_err(dev, "software reset failed\n"); + rval = -EIO; + goto out_cci_addr_fail; + } } if (sensor->hwcfg.i2c_addr_alt) { -- 2.35.1