From: Jonathan Lemon <hidden> Date: 2021-08-11 18:31:38
If attempting to flash the firmware with a blob of size 0,
the entire write loop is skipped and the uninitialized err
is returned. Fix by setting to 0 first.
Also remove a now-unused error handling statement.
Signed-off-by: Jonathan Lemon <redacted>
---
drivers/ptp/ptp_ocp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
From: Jonathan Lemon <hidden> Date: 2021-08-11 18:31:39
If ptp_ocp_device_init() fails, pci_disable_device() is skipped.
Fix the error handling so this case is covered. Update ptp_ocp_remove()
so the normal exit path is identical.
Reported-by: Hulk Robot <redacted>
Signed-off-by: Jonathan Lemon <redacted>
---
drivers/ptp/ptp_ocp.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-08-12 21:58:29
On Wed, 11 Aug 2021 11:31:31 -0700 Jonathan Lemon wrote:
quoted hunk
If attempting to flash the firmware with a blob of size 0,
the entire write loop is skipped and the uninitialized err
is returned. Fix by setting to 0 first.
Also remove a now-unused error handling statement.
Signed-off-by: Jonathan Lemon <redacted>
---
drivers/ptp/ptp_ocp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-08-12 21:59:54
On Wed, 11 Aug 2021 11:31:32 -0700 Jonathan Lemon wrote:
If ptp_ocp_device_init() fails, pci_disable_device() is skipped.
Fix the error handling so this case is covered. Update ptp_ocp_remove()
so the normal exit path is identical.
Reported-by: Hulk Robot <redacted>
Signed-off-by: Jonathan Lemon <redacted>
Fixes tag would be useful on this and previous patch to make it clear
the problems are only present in net-next.
From: Jonathan Lemon <hidden> Date: 2021-08-12 22:07:15
On Aug 12, 2021, at 2:58 PM, Jakub Kicinski [off-list ref] wrote:
On Wed, 11 Aug 2021 11:31:31 -0700 Jonathan Lemon wrote:
quoted
If attempting to flash the firmware with a blob of size 0,
the entire write loop is skipped and the uninitialized err
is returned. Fix by setting to 0 first.
Also remove a now-unused error handling statement.
Signed-off-by: Jonathan Lemon <redacted>
---
drivers/ptp/ptp_ocp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)