mbox series

[0/6] fix a common error of while loop condition in error path

Message ID 20220529153456.4183738-1-cgxu519@mykernel.net
Headers show
Series fix a common error of while loop condition in error path | expand

Message

Chengguang Xu May 29, 2022, 3:34 p.m. UTC
There is a common error of while loop condition which misses
the case '(--i) == 0' in error path. This patch series just
tries to fix it in several driver's code.

Note: I'm not specialist of specific drivers so just compile tested
for the fixes.

Chengguang Xu (6):
  netlink: fix missing destruction of rhash table in error case
  staging: vt6655: fix missing resource cleanup in error cases
  scsi: ipr: fix missing/incorrect resource cleanup in error case
  drm/exynos: fix missing resource cleanup in error case
  scsi: pmcraid: fix missing resource cleanup in error case
  media: platform: fix missing/incorrect resource cleanup in error case

 drivers/gpu/drm/exynos/exynos_drm_gsc.c             | 2 +-
 drivers/media/platform/samsung/s5p-mfc/s5p_mfc_pm.c | 3 +--
 drivers/scsi/ipr.c                                  | 4 ++--
 drivers/scsi/pmcraid.c                              | 2 +-
 drivers/staging/vt6655/device_main.c                | 8 ++++----
 net/netlink/af_netlink.c                            | 2 +-
 6 files changed, 10 insertions(+), 11 deletions(-)

Comments

Martin K. Petersen June 8, 2022, 2:27 a.m. UTC | #1
On Sun, 29 May 2022 23:34:50 +0800, Chengguang Xu wrote:

> There is a common error of while loop condition which misses
> the case '(--i) == 0' in error path. This patch series just
> tries to fix it in several driver's code.
> 
> Note: I'm not specialist of specific drivers so just compile tested
> for the fixes.
> 
> [...]

Applied to 5.19/scsi-fixes, thanks!

[3/6] scsi: ipr: fix missing/incorrect resource cleanup in error case
      https://git.kernel.org/mkp/scsi/c/d64c49191132
[5/6] scsi: pmcraid: fix missing resource cleanup in error case
      https://git.kernel.org/mkp/scsi/c/ec1e8adcbdf6