-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw-mgmt: patches: 5.10/6.1: Add kernel new kernel version support
Add kernel 5.10.226/6.1.123 support Signed-off-by: Oleksandr Shamray <oleksandrs@nvidia.com>
1 parent
7b7a51a
commit 8319b22
Showing
6 changed files
with
75 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...-kernel/linux/linux-6.1/0030-1-platform-mellanox-nvsw-sn2201-Add-check-for-platform.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From d065f198bf6eb0431c124589efbcbf2b54ae0303 Mon Sep 17 00:00:00 2001 | ||
From: Chen Ni <nichen@iscas.ac.cn> | ||
Date: Wed, 5 Jun 2024 11:27:45 +0800 | ||
Subject: [PATCH] platform/mellanox: nvsw-sn2201: Add check for | ||
platform_device_add_resources | ||
|
||
[ Upstream commit d56fbfbaf592a115b2e11c1044829afba34069d2 ] | ||
|
||
Add check for the return value of platform_device_add_resources() and | ||
return the error if it fails in order to catch the error. | ||
|
||
Signed-off-by: Chen Ni <nichen@iscas.ac.cn> | ||
Link: https://lore.kernel.org/r/20240605032745.2916183-1-nichen@iscas.ac.cn | ||
Reviewed-by: Hans de Goede <hdegoede@redhat.com> | ||
Signed-off-by: Hans de Goede <hdegoede@redhat.com> | ||
Signed-off-by: Sasha Levin <sashal@kernel.org> | ||
--- | ||
drivers/platform/mellanox/nvsw-sn2201.c | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c | ||
index 7b9c107..f53baf7 100644 | ||
--- a/drivers/platform/mellanox/nvsw-sn2201.c | ||
+++ b/drivers/platform/mellanox/nvsw-sn2201.c | ||
@@ -1194,6 +1194,7 @@ static int nvsw_sn2201_config_pre_init(struct nvsw_sn2201 *nvsw_sn2201) | ||
static int nvsw_sn2201_probe(struct platform_device *pdev) | ||
{ | ||
struct nvsw_sn2201 *nvsw_sn2201; | ||
+ int ret; | ||
|
||
nvsw_sn2201 = devm_kzalloc(&pdev->dev, sizeof(*nvsw_sn2201), GFP_KERNEL); | ||
if (!nvsw_sn2201) | ||
@@ -1201,8 +1202,10 @@ static int nvsw_sn2201_probe(struct platform_device *pdev) | ||
|
||
nvsw_sn2201->dev = &pdev->dev; | ||
platform_set_drvdata(pdev, nvsw_sn2201); | ||
- platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources, | ||
+ ret = platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources, | ||
ARRAY_SIZE(nvsw_sn2201_lpc_io_resources)); | ||
+ if (ret) | ||
+ return ret; | ||
|
||
nvsw_sn2201->main_mux_deferred_nr = NVSW_SN2201_MAIN_MUX_DEFER_NR; | ||
nvsw_sn2201->main_mux_devs = nvsw_sn2201_main_mux_brdinfo; | ||
-- | ||
2.8.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters