Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp190246pxb; Wed, 4 Nov 2020 19:16:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYuZk3jlBrMzZpHYLWOEiDcjDm/g8puG9NpGmgLvZ0tCdc9v81OZ37GEdbYyitH3+AaoSU X-Received: by 2002:aa7:d548:: with SMTP id u8mr479457edr.321.1604546206910; Wed, 04 Nov 2020 19:16:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604546206; cv=none; d=google.com; s=arc-20160816; b=YUMCXBTWEe8c0K48XP5mjVBDcXACxtUKqI29cQ2lEJk+cXv/0hvVzBc2cQHtADZefv 8YnPYT3UgMVlY6aTMpGZR8vP2fMeBIJ+nvT478vX7LZg6Mk3aUk/EWnpiH3HeUg2RQEL X1umpC8OtTUoMi3/ANUqwhfuu3ubtDiAA5u6giX7iFBgv1ZbTfHQjO2OCRp+qP0DAoUZ uQvWUwtHcg2s+4qF2uFBN5/Zhejo540oa6xOTNHaKo0Rpr5cK+GufWoil0akwxLaErhI 1r3inc9ocSUSNolKD+rsYsziz6SaDKEe/6XWIbNwQDdoL80rHgQFXJcatwMDfozWQPMT 3j3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/5hPZRr7en0GF/Kar27SNiGFOXDk9IUl/tv+YCJvElY=; b=z5uE/cpmE5h/OhkuW+5E3YppJCb7Qtyv9qlDrH+yJdjjpu4u9ckhpRI5y1SEppBDbd RXRZVC6gXO/4ql0xjh42HYMdg0m1juXHptIHPnqcWafvVBknqoarMWbIFqR0vwNpul2r UICqEEdHsWjKUNgIvDVmlNnrxJAyuBA+gJeP7OSsAXAO8IB6T886B2A9PqtGKY5+5wtS QJwR+r+4hU4CMuokkrBaitBLllDQkpfDnmamip8nyyxImP8BKZj8XSqVIAANOvBl5cVW 2Ad7Wu4iNrqraIDt6w09aY5W0B04e0dyGmuIacBKLzOGuB6DEEZLZbi0Ef67A1pnievw Iv6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vCvoXPnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si242390edd.464.2020.11.04.19.16.23; Wed, 04 Nov 2020 19:16:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vCvoXPnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387568AbgKDXwz (ORCPT + 99 others); Wed, 4 Nov 2020 18:52:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733200AbgKDXwM (ORCPT ); Wed, 4 Nov 2020 18:52:12 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDAAC0613CF; Wed, 4 Nov 2020 15:52:12 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C1CEB04; Thu, 5 Nov 2020 00:52:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1604533930; bh=HeBPtwkKfdCuw+ixNJWWKnwgqcZWXRhxdmFr/Zdn46I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vCvoXPnPA5yySy2dFyBpPfZ3Pjp/Yagl2Cl3xrGwwR0EFabUCK2LSDaUnK8xlS2+s NcyzcadWZ7qMBzZDOz+sciLZBUnYTv0FGG80Bn884iEodWmD1pt2aylEG/IFmN9Fzl ewPkB8Ft8rFMO8QGfxj+Q8lqEbpOSc2ZfM96XZM4= Date: Thu, 5 Nov 2020 01:52:09 +0200 From: Laurent Pinchart To: Xu Wang Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Sakari Ailus Subject: Re: [PATCH] media: i2c: mt9p031: Remove redundant null check before clk_disable_unprepare Message-ID: <20201104235209.GP29958@pendragon.ideasonboard.com> References: <20201104092948.8560-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201104092948.8560-1-vulab@iscas.ac.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xu Wang, Thank you for the patch. On Wed, Nov 04, 2020 at 09:29:48AM +0000, Xu Wang wrote: > Because clk_disable_unprepare() already checked NULL clock parameter, > so the additional check is unnecessary, just remove it. > > Signed-off-by: Xu Wang Reviewed-by: Laurent Pinchart I expect Sakari will pick this patch. > --- > drivers/media/i2c/mt9p031.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c > index dc23b9ed510a..a633b934d93e 100644 > --- a/drivers/media/i2c/mt9p031.c > +++ b/drivers/media/i2c/mt9p031.c > @@ -346,8 +346,7 @@ static void mt9p031_power_off(struct mt9p031 *mt9p031) > regulator_bulk_disable(ARRAY_SIZE(mt9p031->regulators), > mt9p031->regulators); > > - if (mt9p031->clk) > - clk_disable_unprepare(mt9p031->clk); > + clk_disable_unprepare(mt9p031->clk); > } > > static int __mt9p031_set_power(struct mt9p031 *mt9p031, bool on) -- Regards, Laurent Pinchart