From patchwork Thu Feb 8 07:05:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 198199 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp20998dyd; Thu, 8 Feb 2024 00:25:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXgiledE4PbQGUsbLfZSeROdYls8e5SfebadBwfGW2GmSjs1dpwI+v5bwL5RBjNH5pyONBiVNK7dgmRieipIQ4Ncdl2xA== X-Google-Smtp-Source: AGHT+IFCdxqlcTTdk93S95YZzKAj3+ZS9NviCFBPDBVd6uTTvrTIZMfItEvHajFVYXvyP9Sz34m9 X-Received: by 2002:a0c:dc14:0:b0:68c:9023:6319 with SMTP id s20-20020a0cdc14000000b0068c90236319mr7518164qvk.22.1707380714832; Thu, 08 Feb 2024 00:25:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707380714; cv=pass; d=google.com; s=arc-20160816; b=Mm4tZ/ndBqwd3/aEz8qbbpHrz5JupKq0KDEL/vBn6RRuE4xbKJT51F3z5Yxq9qUU8a 7fpLiUJyNPbGf+AEiA0sZToZ4GVKuUFgpjZ0i/5NxQDsVkUKPgjUNm+rRKg2P3vOk9wz j2KHqU1EEMFmFsc0xqK5lHDmBH3ZJP8NkhdZqDxPK68NstWt14yyl5YTBqsmohNwMyaf GLeUF6nkMSkkVcezG/JmqSCEzVHe2boEQ8eYFQ+nxz5gQpGzic8Fx4tel3YVY7RJ7I1P KTGP5zPwd1pXS4zs4GZFO/U6WUi2/e6nnQVm+Ctn62QcC1fa8UQlw8z9jsuTpPvlhX7y b38A== 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=jge5rShHg8YqOhb3XT+KSLl5pRl1eGG0uiBeIk0osQE=; b=KtoGlsIbeMeqA0mU3PyjPMtHkHykEx7BTMMgvdc57j1hV12Z7uUj742gXGdPzTcgM7 d9BlLqsqjRLaHzsMmbKqnyNKdZ246mL7D5QSHgrAFMFjMHuXvu7oG4gLJ12H1XqQZ/na gDSUiDEQ1y1vRu1MyNEMtb9FHAirRHyjy+I01aO0XkIzolofWmtOv6LlFU+PnpM/jGSF +poDQpGXR8mgjIqTZd7qerwiUdns0k5hnKcyzo55BwJP6jLDfyXpDsEgT5uPy/ok6Pjy Qx6N31fHYTzSsjOPz+kUN5aNKPrwYeb0CjjPOE1qpcgKEtSQx1gFLgrqv1L7kOClNlH2 t3hQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57545-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXt1MoUfybq9o1Qin4Jz2YJWYVUXVGuuO3vg3LOAgdfHC79lSbYigHwayF1/oe+CMcwrHWg8bc+3PH71KtOtd8P2aKC5Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u2-20020ad45aa2000000b0068cb7c033d6si3017131qvg.24.2024.02.08.00.25.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:25:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57545-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57545-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AC13B1C24DA7 for ; Thu, 8 Feb 2024 07:07:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C170D6A8B4; Thu, 8 Feb 2024 07:05:51 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790316054277920142 X-GMAIL-MSGID: 1790318440095027955 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)