Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2435008rdb; Mon, 12 Feb 2024 05:03:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHEUi5sN2cYitzg0/Uym9AqfUC/s3o/q27BZ98QLP+D5oud7+3Y4UvR3x2bMuuSAlv/w16 X-Received: by 2002:a17:906:3758:b0:a3b:b334:2f29 with SMTP id e24-20020a170906375800b00a3bb3342f29mr5521643ejc.4.1707743024652; Mon, 12 Feb 2024 05:03:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707743024; cv=pass; d=google.com; s=arc-20160816; b=MQKbFKynpEUkZLh64JyNTfw0I8TrrhOgLXUA0GhSzfYVcAEYWSIxOQ434becuBN7+s hFhDDLBycftfuWYoT6+RtyIptvjyE+UT/TkCy3hNvJ+Ncx+JcDW5oEMsSyahwdB6H28X ZNrxBiRh0kYdJIWqUhbk+qZz2kYRDjQ54lg6Y05iKIDv8rIo4EhGTtCDHSAeS7EBDGJR qWnH1vLSpgnGeSKsF9WjmkkmhCU+bVsV0Jn4OHEYw5qsIXSoawAO2+Ec5fI+bqQzwd3V W4kMPoVSvnezpm6TT1f3Jc/rcWoCSTWVBmH2+vgX94WP6yff7ziMUIbXF3UtDNO+LDyC Itvg== 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=9ZVq9PbY9jhCQgQcSl8HbYK6MFvocqtBlpd0akSo818=; fh=I12L2yAfVKoDboO63vBqak5Jlw6lOUZDom6ajuia5oc=; b=FwTYYtOJ8xilyVLQLj3V8MZzUrB1x6Ug1W2pIVQl9xMAo2qL34IRTo/YfNGV/rK4mS sJ1HBktxfQ0zLy7bb5hVo0CQ9KMMdvgpNz3E9vzG2Mc4zIq1VWxAhGB/Nc85c8genSKC LDJ+iexMwui0mLLY449Q2tpo7LAEDv5a3LpJYb2dUnx3E1PSRzzQwxNRKXUuqFSt1GfA 6JwXJAmrGoSrVIwYLAbCYkTFR8+LZDNy6G6dE5oEZLIi7iphvFknbSBkWmzEyy+XT8mh fO+w94XDmsY8DOwOIZOunMwZEYpedERDVKM/NPkCYjA2H0MKYRvPnPIEmh+yrJNbTm1l uvew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DINeFvUH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61594-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61594-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; AJvYcCUOOvz8+IyU9hUT2d7IRzbyb5azgC5eg+oWrO6nj8POkoSp8pbV6V13VSp0KXJg69SOsrfIWYBk7UZF5jqLFQqj70lSe6MRv8H7Z3mfcw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g24-20020a170906595800b00a38461ed233si188364ejr.193.2024.02.12.05.03.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 05:03:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61594-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DINeFvUH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61594-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61594-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3B3D21F274D6 for ; Mon, 12 Feb 2024 13:03:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1402E3B197; Mon, 12 Feb 2024 13:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DINeFvUH" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 E64063A8D8; Mon, 12 Feb 2024 13:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707742978; cv=none; b=kDNfbQ84feT7OYivBWAeVTVpYcAkoGHD5Owm4bYDYDxDVLnXt1rG160XLGy6xUKgMHzv+1oM2e16e2CZHSZTMu681V+Jz8EqN1a/859SnYO7ZBlGT04qj2XK5l7RnguvrRxNIWKegl+uYIKMrzDSxvn5iF1/2K0zeuDVvRjI6Xs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707742978; c=relaxed/simple; bh=FOjkuLNdMv7J4yMpAY56PojaEyEBEaN6z3QYgOvwO2s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aAznzhktiIXrPo7Q3rpMuLpH9ve7wVadFYhV0Rl5LPzxmb0Ugv6K7el+Ob0ldvgT3kEiR3ZW113Aucm+7l7LjQh9eSygi0tldPXZgzoFcp2axUsTyw7gTBIoxjmX66d9sqvMOifjv9YDuP8ecY9cX9MvTbpZwXwCqiRiQ0tAp5g= 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=DINeFvUH; arc=none smtp.client-ip=192.198.163.17 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=1707742977; x=1739278977; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FOjkuLNdMv7J4yMpAY56PojaEyEBEaN6z3QYgOvwO2s=; b=DINeFvUHtG1mPYSJOWIomQz4ZHG/ROVL2nmmD2px5mxlb2YSolm1hVV7 mUQfvf5vlOgnR4bCv188axvJQd7Q/PKczpWXigrYc9IJjT4XbmgPCzShR kpgtcq73V0emfrWovv/u0GfctziYGgO7IQpMLyBlHumqcwyjLl0z5eIZC 1r6+plvCRVszUAZT+f2/044uBiWQpLmpmkKFvDV53Im4TqETsKVYmI6s2 J6RMgmCXCG+TFDAjukh7NPLcLc/zr/zMITG+FKQq62KS4nNhBy7MCa4dH N2c14ytor43IvtWLoZGFjJEz1Nbphtu/xaV+M0ZAwbMWEpm297aFnPfQP w==; X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="1594837" X-IronPort-AV: E=Sophos;i="6.06,263,1705392000"; d="scan'208";a="1594837" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 05:02:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,263,1705392000"; d="scan'208";a="33378393" Received: from inesxmail01.iind.intel.com ([10.223.57.40]) by orviesa002.jf.intel.com with ESMTP; 12 Feb 2024 05:02:50 -0800 Received: from inlubt0316.iind.intel.com (inlubt0316.iind.intel.com [10.191.20.213]) by inesxmail01.iind.intel.com (Postfix) with ESMTP id 5854D1CAD0; Mon, 12 Feb 2024 18:32:49 +0530 (IST) Received: by inlubt0316.iind.intel.com (Postfix, from userid 12101951) id 546041600102; Mon, 12 Feb 2024 18:32:49 +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 v3 2/5] pwm: dwc: drop redundant error check Date: Mon, 12 Feb 2024 18:32:44 +0530 Message-Id: <20240212130247.9985-3-raag.jadav@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240212130247.9985-1-raag.jadav@intel.com> References: <20240212130247.9985-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 Reviewed-by: Andy Shevchenko --- 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 a4a057ae03ea..b9e18dbf7493 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