From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.nod.at ([116.203.167.152] helo=lithops.sigma-star.at) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1w0lmz-0002RO-EQ for apparmor@lists.ubuntu.com; Thu, 12 Mar 2026 19:33:45 +0000 Date: Thu, 12 Mar 2026 20:33:42 +0100 (CET) From: Richard Weinberger Message-ID: <1584421372.26258.1773344022512.JavaMail.zimbra@nod.at> In-Reply-To: <20260310-b4-is_err_or_null-v1-48-bd63b656022d@avm.de> References: <20260310-b4-is_err_or_null-v1-0-bd63b656022d@avm.de> <20260310-b4-is_err_or_null-v1-48-bd63b656022d@avm.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [apparmor] [PATCH 48/61] mtd: Prefer IS_ERR_OR_NULL over manual NULL check List-Id: AppArmor discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philipp Hahn Cc: amd-gfx , apparmor , bpf , ceph-devel , cocci , dm-devel@lists.linux.dev, DRI mailing list , gfs2 , intel-gfx , intel-wired-lan@lists.osuosl.org, iommu@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel , linux-block , linux-bluetooth@vger.kernel.org, linux-btrfs , linux-cifs , linux-clk@vger.kernel.org, linux-erofs , linux-ext4 , linux-fsdevel , linux-gpio@vger.kernel.org, linux-hyperv , linux-input@vger.kernel.org, linux-kernel , linux-leds@vger.kernel.org, linux-media , linux-mips , linux-mm , linux-modules@vger.kernel.org, linux-mtd , linux-nfs , linux-omap , linux-phy@lists.infradead.org, linux-pm , linux-rockchip , linux-s390 , linux-scsi , linux-sctp@vger.kernel.org, LSM , linux-sh , linux-sound , linux-stm32 , linux-trace-kernel , linux-usb@vger.kernel.org, linux-wireless , netdev , ntfs3 , samba-technical , sched-ext@lists.linux.dev, target-devel@vger.kernel.org, tipc-discussion@lists.sourceforge.net, v9fs , Miquel Raynal , Vignesh Raghavendra ----- Urspr=C3=BCngliche Mail ----- > Von: "Philipp Hahn" > -=09if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp)) > +=09if (!IS_ERR_OR_NULL(gpiomtd->nwp)) No, please don't. This makes reading the code not easier. Thanks, //richard