]> git.hungrycats.org Git - linux/commit
platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources
authorChen Ni <nichen@iscas.ac.cn>
Wed, 5 Jun 2024 03:27:45 +0000 (11:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2024 07:53:34 +0000 (09:53 +0200)
commitd18449f56ab8b5b5df64c85ca0927612fe9c9a61
tree9af1e9daafa44db15f2214d96d08b3da776ad6c0
parentbe0259796d0b76bbc7461e12c186814a9e58244c
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