Patch "net/mlx5: FPGA, return -EINVAL if size is zero" has been added to the 4.14-stable tree
This is a note to let you know that I've just added the patch titled
net/mlx5: FPGA, return -EINVAL if size is zero
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx5-fpga-return-einval-if-size-is-zero.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Dec 31 11:12:48 CET 2017
From: Kamal Heib <[email protected]>
Date: Sun, 29 Oct 2017 04:03:37 +0200
Subject: net/mlx5: FPGA, return -EINVAL if size is zero
From: Kamal Heib <[email protected]>
[ Upstream commit bae115a2bb479142605726e6aa130f43f50e801a ]
Currently, if a size of zero is passed to mlx5_fpga_mem_{read|write}_i2c()
the "err" return value will not be initialized, which triggers gcc warnings:
[..]/mlx5/core/fpga/sdk.c:87 mlx5_fpga_mem_read_i2c() error:
uninitialized symbol 'err'. [..]/mlx5/core/fpga/sdk.c:115 mlx5_fpga_mem_write_i2c() error:
uninitialized symbol 'err'.
fix that.
--- drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c +6 -0
@@ -66,6 +66,9 @@ static int mlx5_fpga_mem_read_i2c(structu8 actual_size;int err; +if (!size) +return -EINVAL ; +if (!fdev->mdev)return -ENOTCONN ;
@@ -95,6 +98,9 @@ static int mlx5_fpga_mem_write_i2c(strucu8 actual_size;int err; +if (!size) +return -EINVAL ; +if (!fdev->mdev)return -ENOTCONN ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/net-mlx5-fpga-return-einval-if-size-is-zero.patch