Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2717615rwd; Mon, 22 May 2023 03:19:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5YOe/8IzJK9NqArWfFROR2/k4vV5st2puodbweAGjFxpuBRLI7LPyCuyaQMofJcUb+nXcT X-Received: by 2002:a05:6a21:6d95:b0:10b:ce6e:656b with SMTP id wl21-20020a056a216d9500b0010bce6e656bmr2102038pzb.46.1684750781355; Mon, 22 May 2023 03:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684750781; cv=none; d=google.com; s=arc-20160816; b=qHY4N/uahKqnYWrYhg0Kw/YgPBvlA3dc0RpCss+EpnfPsGi37o95K6GIs6FEnAdrzg zC19JhIlp5nV756+3Kyr5g9KufqeXoBr3Nlc0EgSQr1JSZuEyk777pPT9fpGhRkUr7VF KmnOr3VN60+Im/THDSwztPnlJmTydoCImQb9UARfExxyVPjGoIlXLszQjSoEgduQKlQ5 PGv7tIhOQbfypU/WsWeRGPIudsSyQBn15GpbZNeKzHEjG5hL2gaL3joxp7/n+sy+zZpC GUgoan2nGbP1wgsw77TBSESdlPaQ/VldKq4rSsNgYBEZ90wggiy+FoptxqoNObUm75B/ kVrA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=WvRczJl52P0t6HqPByOlri08IlJIuEqifiYNaM5Sz9M=; b=t46Nj3J6OOVBNlJeMFJkPSQnV5UOsALZ94M4A/odpELYceLezAc2eU9aCJV3iGoe+Y b5JA1GH9xBn7rt7gdX/Pwyo3f5POACX1piIZbGb+ntQBEPr9CERJgn4osdLw+MzpX/ab vr7H1xL7hgtLseCQ8bGhh2pG4qWrOXOU1C6ydto/bEDt8LZimZhwOv+m9CETTjOmgfYV N5o/8zCbRXJBRecAdzd4KHva8U9cwsPlyqaJ4QbVWbI7hBkcRTr1T/buzc07WIdsVGgn Avl1mMere7V3Rgj2qKM+Va31HEmDZOdQBcDpDUiiwk1UiTOsU5vb6SnqZCuAMd7CCLSE TOGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iSqj3mBD; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a632c02000000b005288509b88asi811323pgs.681.2023.05.22.03.19.28; Mon, 22 May 2023 03:19:41 -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=@intel.com header.s=Intel header.b=iSqj3mBD; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbjEVKMb (ORCPT + 99 others); Mon, 22 May 2023 06:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbjEVKM2 (ORCPT ); Mon, 22 May 2023 06:12:28 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B16FC4 for ; Mon, 22 May 2023 03:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684750348; x=1716286348; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=AowsIVjN01hSsP2hzA0Y+/oOa5/gKk8cHmqVtZrsmWs=; b=iSqj3mBDRpqe2L2xzWanJrkicr7mpt6hVqtkykTEZfqnwmjx6ALV3QNz jCo8QsuAPKu5f/mTed/rpL0uaU8eiTvCc2atidItkfhgRlCyMhZ9dlZsu wWKbb10+2T05PKvLA7ZKXmlxRRChXXoeZDG+DSzYRYz1YFR2iJ94XzLVG 7J4asfBVFoLrvLQwyWS59zTZv48xTXWs/UIbfDycKJeKg9awdPBrbUoZK yqJWnGWAqtLi7kMmCMPYiwEEqHdIVC7c20XOUnJTCiTQ7lCHbGjfpm2m8 XGE4Y4Z0ETzQ7m4b5rmWjhfNAeByB1VYnAA8svqbqedQ9piHauHVWeqbh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="333245339" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="333245339" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 03:12:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="1033575412" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="1033575412" Received: from twinkler-lnx.jer.intel.com ([10.12.230.239]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 03:12:26 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , Vitaly Lubart , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next 1/2] mei: bus: drop useless cldev null check Date: Mon, 22 May 2023 13:12:09 +0300 Message-Id: <20230522101210.2207395-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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: Alexander Usyskin cldev cannot be NULL when derived with to_mei_cl_device(). Drop useless NULL-checks. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 5d7a68674d9b20b32c415fe8..33ec6424dfee25aacd862fd0 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c @@ -1046,9 +1046,6 @@ static int mei_cl_device_match(struct device *dev, struct device_driver *drv) const struct mei_cl_driver *cldrv = to_mei_cl_driver(drv); const struct mei_cl_device_id *found_id; - if (!cldev) - return 0; - if (!cldev->do_match) return 0; @@ -1079,9 +1076,6 @@ static int mei_cl_device_probe(struct device *dev) cldev = to_mei_cl_device(dev); cldrv = to_mei_cl_driver(dev->driver); - if (!cldev) - return 0; - if (!cldrv || !cldrv->probe) return -ENODEV; @@ -1276,9 +1270,6 @@ static void mei_cl_bus_dev_release(struct device *dev) { struct mei_cl_device *cldev = to_mei_cl_device(dev); - if (!cldev) - return; - mei_cl_flush_queues(cldev->cl, NULL); mei_me_cl_put(cldev->me_cl); mei_dev_bus_put(cldev->bus); -- 2.40.1