Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1449501pxf; Fri, 2 Apr 2021 10:44:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/h7xGSlia60R95+eE0tMkSRzyz0II5tAoqF5SRSuiw3Ef5x44UPW5Pp/dCqoPuF5JP6cx X-Received: by 2002:a17:906:4ada:: with SMTP id u26mr15145189ejt.129.1617385481172; Fri, 02 Apr 2021 10:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617385481; cv=none; d=google.com; s=arc-20160816; b=n+UfurBqs4GrxgtfiU2C13WwgVFdGmgRQkfemkuJVMezIZjyfAUSFtzT188w1lhuai 8DX5g4mR19TAGrmsQDcIi28uCh7U1ayCH2ftGQWlYWaBlGgUu0H3pUw85/EXZQNYs8Ob daDdrsWEL8JdjhYtHD6m/G6895n7YdKM8QOW7nkH2fVeJioL/RdmIa2Vb04MTRGBG8Ut B5vcvu/tQBrg/ANYCl5y9eart1BhARRymGl3hhwCvr0S8Tmr63MnnfgkDdQn9cUMZYje oKFB+LHBlYC3VbWQrWi78N30T7ENOVDsOFFmi/P0odLcB0PuS3PzT2EtxcEaSYyzspV4 zBRg== 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 :ironport-sdr:ironport-sdr; bh=aVPxJeEwqa5MYORTNINHJLxtbfvUstojaO7qT4vqX+U=; b=aG5FYzUlvzXxANJhlUgXZoWPVTgdprbhcYgGc/8ozLtRPZMsM54swWilTSqs9yGCyC pORLBch+fricXwvV9ocImpnW2Na6vHI7lRqNLNA57BmG0nif+z8BFETyPP8Sksjx3GHO lvtzTcvP6vIjq1aknK+fYgPo2USowuSYPZoNfgohWk/BIH/thg43H5HSJrYR4NmvMBKJ YVm2SgmCwZJKqXKor8ZgyrodLhJYj5neno83VYQxsaNOZgUaLhvCRPXy13vwhpFVCQ9n aPlIbbuWwtcfnhCSonjn2Hg9YkO0gGx2U2O4Oe6VnpG+0YTV/zUjNl78cv091VxU/u+7 iDxg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si251887edq.540.2021.04.02.10.44.18; Fri, 02 Apr 2021 10:44:41 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236037AbhDBRnk (ORCPT + 99 others); Fri, 2 Apr 2021 13:43:40 -0400 Received: from mga05.intel.com ([192.55.52.43]:17914 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235876AbhDBRna (ORCPT ); Fri, 2 Apr 2021 13:43:30 -0400 IronPort-SDR: itE+r/OA79lNu8rAZtDWp3RdmVvdR6KRaAVOPNCLuqFPOsNzPoBeCXz8SDbrGXzKNf1Tg3iG4B SO7MheuLE/rw== X-IronPort-AV: E=McAfee;i="6000,8403,9942"; a="277702231" X-IronPort-AV: E=Sophos;i="5.81,300,1610438400"; d="scan'208";a="277702231" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 10:43:28 -0700 IronPort-SDR: vTHVuaPDrEpYeFIAMCyrMd6QsqBFaxYqX0Y6paXYTdOkD/vqvpMFgSIyjqsxQKIBdnORtz5NOy LAQzXF/PQXXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,300,1610438400"; d="scan'208";a="528673883" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 02 Apr 2021 10:43:26 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id CE981668; Fri, 2 Apr 2021 20:43:39 +0300 (EEST) From: Andy Shevchenko To: Corey Minyard , Andy Shevchenko , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: Corey Minyard Subject: [PATCH v2 09/10] ipmi_si: Drop redundant check before calling put_device() Date: Fri, 2 Apr 2021 20:43:33 +0300 Message-Id: <20210402174334.13466-10-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210402174334.13466-1-andriy.shevchenko@linux.intel.com> References: <20210402174334.13466-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org put_device() is NULL aware, drop redundant check before calling it. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi/ipmi_si_hotmod.c index 087f5eb1ebc0..a07ef37c0e3f 100644 --- a/drivers/char/ipmi/ipmi_si_hotmod.c +++ b/drivers/char/ipmi/ipmi_si_hotmod.c @@ -223,8 +223,7 @@ static int hotmod_handler(const char *val, const struct kernel_param *kp) if (strcmp(pdev->name, "hotmod-ipmi-si") == 0) platform_device_unregister(pdev); } - if (dev) - put_device(dev); + put_device(dev); } } rv = strlen(val); -- 2.30.2