Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp753016rdh; Wed, 14 Feb 2024 10:13:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX2+H/Y4IyRtGkO26g2aqrykGAvsAxeYE4TDVEn17DXT5K6nbXAPKrlsNoykVrYzQHmj2uKll+Refi6vq2SSUBRXpugwt8HHWMLZDpecw== X-Google-Smtp-Source: AGHT+IHplL2F+LjwvU961EI6ywdavqJmvV4X6j8syK35RAsZcZ5QLZT3MXDBuAH7iOn7Ud9LXiWi X-Received: by 2002:a17:90a:b112:b0:297:1927:71ed with SMTP id z18-20020a17090ab11200b00297192771edmr3380278pjq.6.1707934425335; Wed, 14 Feb 2024 10:13:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707934425; cv=pass; d=google.com; s=arc-20160816; b=Gi33+q3DLeQI2h5qdu7GT/84h1UV3EYV+hTfGHEeRjfob4ZCEDrKY92DMz14oZERz7 Hpio8kkiHPdKOTvJ7sKc+k4JKi5jl8C2jtytFrmL44uzRPF5fQ+gI4jndyEKsmed0urs gz9atVF4jQL7d+WpI4rRh9l5foxi9QjdQKjG7QXOni0pWqWDHt60ibzcr3MTvSu9PuaA BdHS+wrOg7YdevXw+mm6mDNV5ec6B1GGkc44HyI/20zmfmKNPlU2J3Oq8NB+J+sZYpFo z4apyW93zoHtxFrKwAaHw9xxgReDq8IMCUQIu+vLn3oehwpNwFCFqsPF20QxeKvERPfd Hrpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=8/lhDgSE0FEoqGfNXAj7kUx9wE0BCnOnZJ9bXaEoz5k=; fh=ZZPbh6o7IC4z5NoYIGG7e5qDyg/iVuvz3u6xVK6uxuo=; b=OF+vSzWAtkqUCidiIMMXsrBMfFv5dI5qaV5/UW9TOUqrGvonzQvHleCPDn4bsF04yh xmN01P69C92ZSbcfOGWH2ciL65AFR6eHyBIKUFr4619Vhj8WOJ7tbFQlJCjzxVYOsqGr uR/3uPTiFXo2hIAAsrZ18Q+BkyWXh88uUEBqQ5zEOaR8W+9Q780hMNkAfQv3FETqwVi+ PjdIQHeQEo/yN//ySPeMvpYENnBnk14b4Wjrk214hgSD5ho4M1dohdddGlgtotWGCXrp 3MlALgBQngk+I0HOYpmUlhMChUASq1dvGi9HV1nxwcp4fzfQus7EjTGhEICDN8mw9b1r 6vCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-65712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65712-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 7-20020a17090a098700b00296f57d0e2esi1512551pjo.111.2024.02.14.10.13.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 10:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-65712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65712-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A4C46B250C2 for ; Wed, 14 Feb 2024 17:48:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A03F8126F3B; Wed, 14 Feb 2024 17:48:12 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 3FFBB84A3E for ; Wed, 14 Feb 2024 17:48:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707932892; cv=none; b=CFcqc9fR06uK3LqSOr91LIlKGxtmYPN+F6iFq06ENPMZuNzWtuRsPOFC+NFNk7qjvdSmDFgxU1ECCLiVlX1dGhG8FKl1a06JnV22w8KMS7iq3MIWKaJh4zFzay82Yg2PHiv/h3qRqZnC7bkSRLody2aQkxTCJkPxVw6TNTPZkNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707932892; c=relaxed/simple; bh=gbq9OzeNqFQNnrHsEb/+a49suHjbLpJ9oN3beT8rY+I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KssDrmwQQfl50ZFK5L7MAn32XVAawEpofzJELSoXM5dELvPK3ZxNkcuplm6f9+bohHltC6I/vCFcaEY8Zy0cWJe7rRv/y5du9wHjAMZxjbQTYe+6nU70wjvEWQOZepbfYIXSyiO5dhuTWysMBOqJ2AJ78Fo4XWOsX++PYZ51AJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1raJMX-0007oS-O2; Wed, 14 Feb 2024 18:48:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raJMW-000jXW-JA; Wed, 14 Feb 2024 18:48:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1raJMW-004sDM-1f; Wed, 14 Feb 2024 18:48:00 +0100 Date: Wed, 14 Feb 2024 18:48:00 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Raag Jadav Cc: jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, lakshmi.sowjanya.d@intel.com, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/5] pwm: dwc: drop redundant error check Message-ID: References: <20240212130247.9985-1-raag.jadav@intel.com> <20240212130247.9985-3-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-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fyfi2hhyykxly2x4" Content-Disposition: inline In-Reply-To: <20240212130247.9985-3-raag.jadav@intel.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --fyfi2hhyykxly2x4 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Mon, Feb 12, 2024 at 06:32:44PM +0530, Raag Jadav wrote: > pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to > check for failure if the latter is already successful. >=20 > Suggested-by: Andy Shevchenko > Signed-off-by: Raag Jadav > Reviewed-by: Andy Shevchenko > --- > drivers/pwm/pwm-dwc.c | 4 ---- > 1 file changed, 4 deletions(-) >=20 > 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 st= ruct pci_device_id *id) > } > =20 > dwc->base =3D pcim_iomap_table(pci)[0]; > - if (!dwc->base) { > - dev_err(dev, "Base address missing\n"); > - return -ENOMEM; > - } As just written in reply to v2, I'd like to have a comment here saying that pcim_iomap_table() won't fail after pcim_iomap_table() to prevent someone sending a patch that undoes this change with the reasoning that pcim_iomap_table()'s return value should be checked. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --fyfi2hhyykxly2x4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmXM/M8ACgkQj4D7WH0S /k5eVwgAo8+fgjlPKlOVwdu4zufeEVTAJWo/ckkPRL12W2oWFVezhopw9ddhT6KI A879ca/VmSc6GJjtLxClCi4cKtuCnKJ0cslZJt4uXIWXcPxSiuoQijspBLjHl2wo I2V1dA7M23LXHsuhq+Goz9K2f6rAuLZ6oxHPARpNKBAZUcTdUp2Sz1rJ46lN9GBe vnFwKTc0wgWn06bPkTKl7XUTwYLyoddbTxw5MIHLy0FsSwzq556tycMCm4bsLYwd IAK2e78vsVgrK+q9QyfrivhiWxwVA47N5L3SG+8u1dYlBo2fXTv7/SQ9kTowykey OS+oV7Zr8h+1BCBht5BT2FByeIhhqw== =NEiF -----END PGP SIGNATURE----- --fyfi2hhyykxly2x4--