From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D28D8479860; Sat, 12 Sep 2026 11:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789213534; cv=none; b=cKMzgXllv4WkscgzO0GQdmdhvvZfBLdFbINTcgZTK67N//GT8pGuPdKk6aN47tZIFCaejOTO5kDyN62q1pRk5r/iQu/qc5tz71NfqIgdlYwABLM1kwnWW45z7PVvNQFGfExko2sphO1quf72JF/LiOsQH3tdY1LQ79I8hR/T0Sg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789213534; c=relaxed/simple; bh=ocGC8HJbrb/ObdFMUHnDRKaXfjYsNL1N1WdkaEiFjy4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Smtm4zw2WQh8FDK2ZAWwV4/gYssUij1jRsjjhehMTJOJDH9rL3/Rqy1ael1c5vTPtgog1HB76XHlnVYpTzjE7xMWc9ecR1YPpX0Np6Ejj0BLbi343ChyH7aVBwBE+8u+G8j5pm1EOJRAOVg56HoZd4aRI1p3gj1Bb92su6TutIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IorAPuce; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IorAPuce" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A2C71F000FF; Sat, 12 Sep 2026 11:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789213531; bh=BnQ3qspspYTdP2flKkn4PKTxh5BO7pBhK+Y3BM2xJ6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IorAPucexzhvojFysNf9CVJkFC3RV3SfeQNLGZNQCPnu+k314oRoED31n+RImhxej gLeUF8BKRQo1FHtOpvwzqVH2wX6UQP87cCLDUXExAKt4uYxuRlKCvynZIINicONj95 SNDazx8wAZdqmVg4jgxAX1j4FyN3ZJy3zpNCCBlg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Ritesh Harjani (IBM)" , Sourabh Jain , Madhavan Srinivasan Subject: [PATCH 6.12 0098/1376] powerpc/pseries: Handle and log pseries-wdt registration failures Date: Sat, 12 Sep 2026 08:42:04 +0200 Message-ID: <20260912065609.744103073@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sourabh Jain commit e65b526affa621b50646cafdf6b06505af07032e upstream. The pseries watchdog initialization registers the pseries-wdt platform device using platform_device_register_simple(), but currently ignores its return value. Check the returned pointer for errors, log a descriptive error message when registration fails, and propagate the failure code to the caller. This avoids silently ignoring platform device registration failures. Cc: stable@vger.kernel.org Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Sourabh Jain Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20260727053416.276317-3-sourabhjain@linux.ibm.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/pseries/setup.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -193,8 +193,18 @@ static void __init fwnmi_init(void) */ static __init int pseries_wdt_init(void) { - if (firmware_has_feature(FW_FEATURE_WATCHDOG)) - platform_device_register_simple("pseries-wdt", 0, NULL, 0); + struct platform_device *pdev; + + if (!firmware_has_feature(FW_FEATURE_WATCHDOG)) + return 0; + + pdev = platform_device_register_simple("pseries-wdt", 0, NULL, 0); + + if (IS_ERR(pdev)) { + pr_err("Failed to register pseries-wdt platform device\n"); + return PTR_ERR(pdev); + } + return 0; } machine_subsys_initcall(pseries, pseries_wdt_init);