Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp93019rdb; Wed, 7 Feb 2024 23:06:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXxJlSv9zKu0GF/FHxJhy9oaGepCf/gePR3nEc/rgRIQ0H0m4XJrggm8h1C1Pz/s6ba4wArnuVhoyVzon0sQmZGRxypw/cKVeCuAHzQ8Q== X-Google-Smtp-Source: AGHT+IEIX1OlS34ozSCmcss447Vj7xo2EG67E1xWjbaj9oWA04lCYwMUWZoUaaKcGyIHfm40jm/V X-Received: by 2002:a17:90b:1010:b0:296:77a2:42f3 with SMTP id gm16-20020a17090b101000b0029677a242f3mr4789585pjb.33.1707375999810; Wed, 07 Feb 2024 23:06:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707375999; cv=pass; d=google.com; s=arc-20160816; b=P6tA5ZeMoMnFzTZNtVPsDjV7JVo7VANseduWmSnBhz7BVYDTp7dQDLGEFSGG7tdRvJ fvlByBwohAeg9ggkANPg7e9NcYbMf8rz6Etl6Oj47VxryanUgsFT/m5hgKGqC/saA61f Ob97dCx7HefkUwjgAajaXzP3BBtk1f5XOqMI0tqpVlYfZCj20S+ePkw6KnU8VoosZASg mStMqTc4GM8CpVV5sCuITR3o9ralXZ9YtCu/7cs+PO2ihHdbtzMyr9gCNLewj1Xn+XX6 OhuV1Gv7Zk1S96yCsVJ7J4vcJlzTr/CwXu2rjMR/VazkwcLUJt7ZwQJJg+BiPvTxr2P/ VLjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=M64jCRUSpSUkDmHuB3hCKu28JM276TK0qEswvufKzOI=; fh=GZCds9Ge/Epqu3rBwa/ibrGSwxif6CjueY0dCm1bEa8=; b=hjGNpF1trNm7KDGJS3jMZ7d0NRLjDFO7RR4Px07zqxJLl/pz7RRmr002+EpwWucIXG kOc5DL9mFJUY25aHek1rtAAOfGL+ffAPgUUVk22nJNzatkMLJ+fjNvxLsasiBUZOzwCy iu0FZMc1PFTL7Dj3CVGpEirBMWtCtTqSV358Y1uCoYCy0tDv+/9fWt6Pm6dojQ+X6hY7 XfuDIwzQPr2Zh750EW8hW9Dm175gcOBn7BttL8AD+bFFgwNDtzz2w73+OzWStdv5Sl4L v44cxdwv2I80TFbWbMi+gCSoxoPyIH4XN7zbbAYu5PhhMCdo7XbuVNEBdKJQRK45fukF UObg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SxjZ4aN+; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-57545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVTzXEBouCpEA64kpUsO9HpXSjbd95LYjy/yZ+TeJprLstuimYAZzZWNIjHG9IY+3/nylQOLiZCAYGLNRq9Db6/gpUhEPYTANUg7wRQeQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bk14-20020a17090b080e00b00295c11a9575si754790pjb.170.2024.02.07.23.06.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 23:06:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SxjZ4aN+; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-57545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1112A28659E for ; Thu, 8 Feb 2024 07:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8DAC6A320; Thu, 8 Feb 2024 07:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SxjZ4aN+" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA04869964; Thu, 8 Feb 2024 07:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707375949; cv=none; b=lthHGhk275qum1ymrjGBZT7wwcAuF8C9dIkJ3Vsh8WLcBULBGpxVfJr64ZUFZUgtSSa5K9PhEoN175icvKFxUy+GB9H2j1kPN9nVYFJB/Hvpkkk43SKaFQgFV8sKuyoZlVhcxmT5n0Y5Uf79+IOSBtcyh+AA2LP+9bC0+TCl3uM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707375949; c=relaxed/simple; bh=SLcziUGV3wn1pdz6JlsUPS3h94i8kBpVxgL2aMtWd88=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mxEEiXObbavEq7uL05ltwupftHbV5NPa+RzjhKhZjQ6z/Mq7SByn59GU+zVYyOSOmRWGfcKQ1h/QLTvI24j33Lx8YVk+ShiVPVe2k35OtSKqYwN/D/e7XxRKDv6VwhScOHs+ynZ+J7osIZwuppQ2jwsXG0Rleq9Op0gsVoTACkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=none smtp.mailfrom=ecsmtp.iind.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SxjZ4aN+; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ecsmtp.iind.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707375948; x=1738911948; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SLcziUGV3wn1pdz6JlsUPS3h94i8kBpVxgL2aMtWd88=; b=SxjZ4aN+vAVuTrJuTlArZV7DBQaEJwoCymTNU/jQQGya7w9z3UPVnd8I 6A2m1QgLh9NsTxJEAM3quEh0HNCELEG8zCYvZR2hRinVi1Bs00VMKul5s OSzPRkd0OZQywGyZITcF/RDl01PZbpDed7sOrWJJ/1p/NJqK0VJqy5e5g X27ySGCbXyWZPZCH6s765QIdOmKty4fdZksnCIHfkIO/zQsB6UWxQDJhR 1lR/lx0ZaPqG+E7EloRPmdXahuSjkDkMVI0HbbfEyMZ9BawjPRBpXrGxT jRKjJDZOiTn4oW3OZszbPGnUhaOJ8b5XfDPJfTcgc70PVoTaGI7yA6E1L g==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="12525872" X-IronPort-AV: E=Sophos;i="6.05,252,1701158400"; d="scan'208";a="12525872" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2024 23:05:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,252,1701158400"; d="scan'208";a="1573966" Received: from inesxmail01.iind.intel.com ([10.223.57.40]) by fmviesa007.fm.intel.com with ESMTP; 07 Feb 2024 23:05:36 -0800 Received: from inlubt0316.iind.intel.com (inlubt0316.iind.intel.com [10.191.20.213]) by inesxmail01.iind.intel.com (Postfix) with ESMTP id 4E9CB14320; Thu, 8 Feb 2024 12:35:35 +0530 (IST) Received: by inlubt0316.iind.intel.com (Postfix, from userid 12101951) id 4C6131600101; Thu, 8 Feb 2024 12:35:35 +0530 (IST) From: Raag Jadav To: u.kleine-koenig@pengutronix.de, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, lakshmi.sowjanya.d@intel.com Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Raag Jadav Subject: [PATCH v2 1/5] pwm: dwc: drop redundant error check Date: Thu, 8 Feb 2024 12:35:25 +0530 Message-Id: <20240208070529.28562-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240208070529.28562-1-raag.jadav@intel.com> References: <20240208070529.28562-1-raag.jadav@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to check for failure if the latter is already successful. Suggested-by: Andy Shevchenko Signed-off-by: Raag Jadav --- drivers/pwm/pwm-dwc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index 4929354f8cd9..596a0bb35c40 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -50,10 +50,6 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id) } dwc->base = pcim_iomap_table(pci)[0]; - if (!dwc->base) { - dev_err(dev, "Base address missing\n"); - return -ENOMEM; - } ret = devm_pwmchip_add(dev, &dwc->chip); if (ret) -- 2.35.3