From patchwork Fri Sep 22 08:04:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 143365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a55:b0:13f:353d:d1ed with SMTP id 21csp4571854rwb; Fri, 22 Sep 2023 04:07:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX2sHstgf/Z3iyhVbWnvdHNcSOINN0xFYt7YLRGzsPfRCKX9WfDMdGhYvFI2/00JF8GUYM X-Received: by 2002:a05:6a00:2d16:b0:68f:b7f6:f1df with SMTP id fa22-20020a056a002d1600b0068fb7f6f1dfmr9480167pfb.5.1695380859680; Fri, 22 Sep 2023 04:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695380859; cv=none; d=google.com; s=arc-20160816; b=vX4uxj1zdiT6oMYzoF5or0jQzWqHSVWE0wo7aG6B6hn01ND0i0eoizPfyAEFL34yPn 7VO9jRXLIljvimH63Syl+Zn2bcHb0ZCTNWIfcPc2pjVpmTtU7D/TXvBMir9FuUrTIO1z kxuMS6h1Jmnf9nVX+J4eVRj7aHUo19fUqd418/QhhUdiMpyFjbjmjVZRdT5YKGQNOsjc rSwHvfcLLqZZfktjwoskhdPeMEzVhQKIOOOfP8F6Qxg106oFkj57yswI0OBHXpEQ6gLY CikyAPHrr9lUGi4c6uzy4o6LbrdwvUx/So7qvlmeM4zA7D1Wp4ssuytLEhZ1Pb9FPYfB xaHA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pHJcS4UElq8U7kAaQXym1rTExhuP+pYyemAHmyY2Czw=; fh=8Ijxs/PWJBFdYrDVW4Zti1aHqWmGFmFNvBB0mbZaJtE=; b=g7LbtxOQqzXApg/zjvP1/5ImUUGM/n6Ab1qMPDYsua59vAif/I/LOXoU/rJhCNsq7r w43Sse1A839AQ67YABGemComq1TzI3TpTBhfW/hYvFztKc/eoPji68BrgPWN9DG0oL+I LtTIiJPRCPKFXkzfxB5UfGG4GENz/iqysCIr7JuQzKY2FyMM2/ZyOUF4NeggC+eHwSH0 n2RUuc8rhT+OZ0LjuIKfKYiEAfYMgMg90ZTrJfnL7/j3r+q5PQ7cegCwFiUgTV35ZXMw jvOwZ9LPfxrRwjzPA3KEcbuyGTHdqh7/Zxg860gve7DP+4xswl9TzEOXz+mHZFc60U5Y px6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=icSGGAGf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id a70-20020a639049000000b00573ff094485si3668534pge.250.2023.09.22.04.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 04:07:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=icSGGAGf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 08DC6823CA27; Fri, 22 Sep 2023 01:16:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232378AbjIVIP5 (ORCPT + 30 others); Fri, 22 Sep 2023 04:15:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbjIVIP1 (ORCPT ); Fri, 22 Sep 2023 04:15:27 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BCB5E77 for ; Fri, 22 Sep 2023 01:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=pHJcS4UElq8U7kAaQXym1rTExhuP+pYyemAHmyY2Czw=; b=icSGGA Gfx3nv8ST6SL5e7NRDXsWtKNN50lhY7mgiTjey35koSVNpgWQ00ZyDw6P1wD2S3X Wijo4LbPdMVGmv47f30bvqsvhF96yYBk/RoRaI9V1Xp2UDUCgdt02CMIrxbd2ugm MpK22LQenJwGNdH9wzL89eBaGiqZXFicglg/UwNjlYdiaON8tpE8m8kt7NPLkTyQ lgQqsUVbJSWIK7dN822qesVkAujBLCOb36Q0bXRtBeNVY4Ti2fA7Nhv11H7LTokK rxKchCoFolOSNWHNbpWxwAlRHoJN1efSK7IE+ogk7ZEbMrEtkrmkNr5afuTTOFSY 4l4XAGc7lEazAReA== Received: (qmail 1310986 invoked from network); 22 Sep 2023 10:04:29 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 22 Sep 2023 10:04:29 +0200 X-UD-Smtp-Session: l3s3148p1@DQrODu4FesIujntX From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Antti Palosaari , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] media: dvb-frontends: drop check because i2c_unregister_device() is NULL safe Date: Fri, 22 Sep 2023 10:04:20 +0200 Message-Id: <20230922080421.35145-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230922080421.35145-1-wsa+renesas@sang-engineering.com> References: <20230922080421.35145-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 01:16:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777735680190094440 X-GMAIL-MSGID: 1777735680190094440 No need to check the argument of i2c_unregister_device() because the function itself does it. Signed-off-by: Wolfram Sang Reviewed-by: Kieran Bingham Reviewed-by: Geert Uytterhoeven --- Build tested only. Please apply to your tree. drivers/media/dvb-frontends/m88ds3103.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c index cf037b61b226..26c67ef05d13 100644 --- a/drivers/media/dvb-frontends/m88ds3103.c +++ b/drivers/media/dvb-frontends/m88ds3103.c @@ -1920,8 +1920,7 @@ static void m88ds3103_remove(struct i2c_client *client) dev_dbg(&client->dev, "\n"); - if (dev->dt_client) - i2c_unregister_device(dev->dt_client); + i2c_unregister_device(dev->dt_client); i2c_mux_del_adapters(dev->muxc);