Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1166155pxb; Wed, 4 Nov 2020 01:33:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1gcPRq5pUhrxRc3btjVN+mVP63EWewzOTbmWAykm8nkQQ1zYAWQXihoPDOY75lwZeGOBP X-Received: by 2002:aa7:dd42:: with SMTP id o2mr25778511edw.53.1604482413531; Wed, 04 Nov 2020 01:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604482413; cv=none; d=google.com; s=arc-20160816; b=0cSPVZNmNcQ+vYnuehFtexuy91FTX7/PLAuWbNyRk0r/qMrlyDDGvFpUx6QfgehhOy 6yAyxizYklIToNwsyDMTLz1g8q4q9eIyr+XaywJcU0RHigmsOKGrCgHpvakQCAElhjKR sM3BpZHSxPBCuY4O3Uzbt3DoXb3yVWi6WQTYBIE71bWFP5Lb6tRG56AnCxASkRA5pj07 Yh8Ri+TPdp4ktUtzoPR/xfchAOxul9Xi+bWwfyXpBARfdTtn4i0X68Q3KGiqs6sZZijJ AmEYitJ/Pg/qbL+6uN9EohvkLguEz2PMYt4zitXhIHlcmamAxHwiJPwFlAA5YeKtxhD3 Ms4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=YrQtYN/J56rHQ4/5nJOBjYlMdbaFKusCv5seAQMcceU=; b=U5n7FNoU7RdzRFcaFswKPfFEHsnV7sgA8YBWQZV+S4zWWzRMbUaBxrLFYvFGOiYEzr 4b3DHhlp3UXE73kpTWduu4A6SagyPbgH4PQ1ib0cbVTcOXP6aRG21S/FdILtwoOYL4oN 6HG/FVIcn/DOm9x/6SETQ9D6basY8EpT1o89sdSTyW1Vh1Gm7oFHYy1xEbmRtnUOblY0 82CdUNDHmZds6kEcZtO4JWPnrwv9wI9/d6VOBNUnB/drVfC52mW6HpTO1kFXql+QnfBe 5cdO0ID7255Uj2P6vuMvp8wH7sTnXYYjKsEHqvb8rIaCqeD5pc/I3rSxvT82KqZjfnaZ XSXw== ARC-Authentication-Results: i=1; mx.google.com; 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 g10si985596ejd.402.2020.11.04.01.33.09; Wed, 04 Nov 2020 01:33:33 -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; 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 S1728405AbgKDJaA (ORCPT + 99 others); Wed, 4 Nov 2020 04:30:00 -0500 Received: from smtp21.cstnet.cn ([159.226.251.21]:52166 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726690AbgKDJaA (ORCPT ); Wed, 4 Nov 2020 04:30:00 -0500 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-01 (Coremail) with SMTP id qwCowACnrYmPdKJfA2MUAQ--.61871S2; Wed, 04 Nov 2020 17:29:51 +0800 (CST) From: Xu Wang To: laurent.pinchart@ideasonboard.com, mchehab@kernel.org, linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] media: i2c: mt9p031: Remove redundant null check before clk_disable_unprepare Date: Wed, 4 Nov 2020 09:29:48 +0000 Message-Id: <20201104092948.8560-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: qwCowACnrYmPdKJfA2MUAQ--.61871S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFy8CFy8Aw1xGry7Ww4DJwb_yoW3Krg_Cr n8Xr17WFWjvr90y348GFs5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vger.kernel.org Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- 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) -- 2.17.1