From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 A32783ABD88 for ; Thu, 28 May 2026 19:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779996578; cv=none; b=tztaWOI5YORPORipWh4lSlo5WtdFB0RCXdWWDIYpkFOVtZkUQ/yrjiRDnkUcW7TYLz1dfZsXBHBERhGT+kvWilE1Fu5en1yysIkCL2yJ8dSRLzrkE93X/bUhG1zf1iIY/KUPvRFCB4WkWHSrGNuXTopFlJNbQovDDtiCgeEi05g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779996578; c=relaxed/simple; bh=7nA5bi2ewxuKWjv2+ea35+u88yKbLErVYN0HxxStM+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cvF2sy3YWKDLclQ8Tme9X49xEcJtQa71Lw6I7EmCIREJ5cuJK6Mgz/SfIlP+Dbz6G5r5ufi9LtfE3tEfRZqy/3VNzCHOolxg2Gln8A9s3pzAfTTtZY41/p7Y80oOByJzU6SnZX0WrTsSPZk3p1535v98wy0qZbPs9wvCV8IfTbw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SY1Q3vyj; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SY1Q3vyj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779996576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gXEMs3m1iU9CvSjiofzhaHKNsr4M9NI1nJV5PXEBxJY=; b=SY1Q3vyjNUDFqXl8jZ0chVshaLvt/bXRoy2vN+Dac2ZH0H6CyCmpsvdyuyCFw05Weme0Zs 208STW/fOZKAVlucr7ISWBE3UUiSPUi/EWhTm1tHOZvnxkVeFmbrNufp5cbhmw3xcT1oMK H6xagoFrZN4C1HlXmZ2AIrLg+Vz7oG4= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-63-NpLvq8C8N86CP8_axzjxIA-1; Thu, 28 May 2026 15:29:33 -0400 X-MC-Unique: NpLvq8C8N86CP8_axzjxIA-1 X-Mimecast-MFC-AGG-ID: NpLvq8C8N86CP8_axzjxIA_1779996570 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2C84619540DC; Thu, 28 May 2026 19:29:26 +0000 (UTC) Received: from GoldenWind.lan (unknown [10.22.89.248]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1A0DF19560AD; Thu, 28 May 2026 19:29:23 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, Timur Tabi , nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: "Dave Airlie" , "Qianfeng Rong" , "Maarten Lankhorst" , "Kees Cook" , "Simona Vetter" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Hongling Zeng" , "Danilo Krummrich" , "Zhi Wang" , "Lyude Paul" Subject: [PATCH 5/5] Revert "nouveau/gsp: cleanup IS_ERR_OR_NULL in rm_alloc functions" Date: Thu, 28 May 2026 15:27:19 -0400 Message-ID: <20260528192847.4077458-6-lyude@redhat.com> In-Reply-To: <20260528192847.4077458-1-lyude@redhat.com> References: <20260528192847.4077458-1-lyude@redhat.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 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 This is probably too risky, see the discussion here: https://lists.freedesktop.org/archives/dri-devel/2026-May/570353.html This reverts commit 281fe11c6c4aebc1a1eb9d21eaab7323ee5af979. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h index ab2bd88eebce5..64fed208e4cf8 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h @@ -373,7 +373,7 @@ nvkm_gsp_rm_alloc_get(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, u3 object->handle = handle; argv = gsp->rm->api->alloc->get(object, oclass, argc); - if (IS_ERR(argv)) { + if (IS_ERR_OR_NULL(argv)) { object->client = NULL; return argv; } @@ -415,8 +415,8 @@ nvkm_gsp_rm_alloc(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, u32 ar { void *argv = nvkm_gsp_rm_alloc_get(parent, handle, oclass, argc, object); - if (IS_ERR(argv)) - return PTR_ERR(argv); + if (IS_ERR_OR_NULL(argv)) + return argv ? PTR_ERR(argv) : -EIO; return nvkm_gsp_rm_alloc_wr(object, argv); } -- 2.54.0