[PATCH 1/2 v2] mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks

2017-12-08 Thread Christophe JAILLET
-by: Christophe JAILLET --- Compile tested-only v2: use devm_ioremap_resource() --- drivers/mtd/onenand/samsung.c | 164 -- 1 file changed, 29 insertions(+), 135 deletions(-) diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index

[PATCH 0/2 v2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths

2017-12-08 Thread Christophe JAILLET
-testing it, I had to tweak the code because I don't have any cross-compiler. I commented the line "#include " and the compilation succeeded. So maybe, this include is also useless. I've left it as-is, though. Theses patches have been compile-tested-only. Christophe JAILLET (2): mt

[PATCH 0/2 v2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths

2017-12-08 Thread Christophe JAILLET
-testing it, I had to tweak the code because I don't have any cross-compiler. I commented the line "#include " and the compilation succeeded. So maybe, this include is also useless. I've left it as-is, though. Theses patches have been compile-tested-only. Christophe JAILLET (2): mt

[PATCH] mm: Release a semaphore in 'get_vaddr_frames()'

2017-12-08 Thread Christophe JAILLET
A semaphore is acquired before this check, so we must release it before leaving. Fixes: b7f0554a56f2 ("mm: fail get_vaddr_frames() for filesystem-dax mappings") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- -- Untested -- The wording of the comm

[PATCH] mm: Release a semaphore in 'get_vaddr_frames()'

2017-12-08 Thread Christophe JAILLET
A semaphore is acquired before this check, so we must release it before leaving. Fixes: b7f0554a56f2 ("mm: fail get_vaddr_frames() for filesystem-dax mappings") Signed-off-by: Christophe JAILLET --- -- Untested -- The wording of the commit entry and log description could be impr

[PATCH] s390/dasd: Simplify code

2017-12-08 Thread Christophe JAILLET
Use 'seq_printf(m, "...%*phN...")' instead of duplicating its implementation. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/s390/block/dasd_eckd.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/s390/block/dasd_

[PATCH] s390/dasd: Simplify code

2017-12-08 Thread Christophe JAILLET
Use 'seq_printf(m, "...%*phN...")' instead of duplicating its implementation. Signed-off-by: Christophe JAILLET --- drivers/s390/block/dasd_eckd.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_ec

Re: [PATCH] mtd: onenand: Fix an error handling path in 's3c_onenand_probe(()'

2017-12-08 Thread Christophe JAILLET
Le 07/12/2017 à 17:55, Boris Brezillon a écrit : On Sat, 18 Nov 2017 14:27:23 +0100 Christophe JAILLET <christophe.jail...@wanadoo.fr> wrote: If 'platform_get_resource()' fails, we have to go through the error handling path to release some resources. The unreachable 'goto ahb_resource_

Re: [PATCH] mtd: onenand: Fix an error handling path in 's3c_onenand_probe(()'

2017-12-08 Thread Christophe JAILLET
Le 07/12/2017 à 17:55, Boris Brezillon a écrit : On Sat, 18 Nov 2017 14:27:23 +0100 Christophe JAILLET wrote: If 'platform_get_resource()' fails, we have to go through the error handling path to release some resources. The unreachable 'goto ahb_resource_failed' is also wrong here and we

[PATCH 2/2] mtd: onenand: samsung: return an error if 'mtd_device_parse_register()' fails

2017-12-08 Thread Christophe JAILLET
If 'mtd_device_parse_register()' fails, we still return 0 which mean success. Return the error code instead, as done in all the other error handling paths. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Compile tested-only --- drivers/mtd/onenand/samsung.c | 4

[PATCH 2/2] mtd: onenand: samsung: return an error if 'mtd_device_parse_register()' fails

2017-12-08 Thread Christophe JAILLET
If 'mtd_device_parse_register()' fails, we still return 0 which mean success. Return the error code instead, as done in all the other error handling paths. Signed-off-by: Christophe JAILLET --- Compile tested-only --- drivers/mtd/onenand/samsung.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 1/2] mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks

2017-12-08 Thread Christophe JAILLET
-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Compile tested-only --- drivers/mtd/onenand/samsung.c | 141 +- 1 file changed, 43 insertions(+), 98 deletions(-) diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index af0ac1

[PATCH 1/2] mtd: onenand: samsung: use devm_ function to simplify code and fix some leaks

2017-12-08 Thread Christophe JAILLET
-by: Christophe JAILLET --- Compile tested-only --- drivers/mtd/onenand/samsung.c | 141 +- 1 file changed, 43 insertions(+), 98 deletions(-) diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index af0ac1a7bf8f..04039b967d59 100644

[PATCH 0/2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths

2017-12-08 Thread Christophe JAILLET
-testing it, I had to tweak the code because I don't have any cross-compiler. I commented the line "#include " and the compilation succeeded. So maybe, this include is also useless. I've left it as-is, though. Theses patches have been compile-tested-only. Christophe JAILLET (2): mt

[PATCH 0/2] mtd: onenand: samsung: Simplify code and fix leaks in error handling paths

2017-12-08 Thread Christophe JAILLET
-testing it, I had to tweak the code because I don't have any cross-compiler. I commented the line "#include " and the compilation succeeded. So maybe, this include is also useless. I've left it as-is, though. Theses patches have been compile-tested-only. Christophe JAILLET (2): mt

[PATCH 2/2] power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'

2017-11-22 Thread Christophe JAILLET
o, in case of error, this added code is executed and the error may be silently ignored. Fix it by adding the missing 'goto out', as done in all other error handling paths. Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support") Signed-off-by: Christophe JAILLET <christ

[PATCH 2/2] power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'

2017-11-22 Thread Christophe JAILLET
o, in case of error, this added code is executed and the error may be silently ignored. Fix it by adding the missing 'goto out', as done in all other error handling paths. Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support") Signed-off-by: Christophe JAILLET ---

[PATCH 1/2] power: supply: ab8500_charger: Fix an error handling path

2017-11-22 Thread Christophe JAILLET
'ret' is know to be 0 at this point, because it has not been updated by the the previous call to 'abx500_mask_and_set_register_interruptible()'. Fix it by updating 'ret' before checking if an error occurred. Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver") Signed-off-by:

[PATCH 1/2] power: supply: ab8500_charger: Fix an error handling path

2017-11-22 Thread Christophe JAILLET
'ret' is know to be 0 at this point, because it has not been updated by the the previous call to 'abx500_mask_and_set_register_interruptible()'. Fix it by updating 'ret' before checking if an error occurred. Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver") Signed-off-by:

[PATCH] bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'

2017-11-21 Thread Christophe JAILLET
(success) is returned. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Un-tested. If not testing the result of the 2nd call was done on purpose, it should be documented. --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH] bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()'

2017-11-21 Thread Christophe JAILLET
(success) is returned. Signed-off-by: Christophe JAILLET --- Un-tested. If not testing the result of the 2nd call was done on purpose, it should be documented. --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH] net: vxge: Fix some indentation issues

2017-11-19 Thread Christophe JAILLET
Some statements are not enough or too much indented. Fix it to improve readalbility. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/net/ethernet/neterion/vxge/vxge-main.c | 37 +- 1 file changed, 18 insertions(+), 19 deletions(-) diff

[PATCH] net: vxge: Fix some indentation issues

2017-11-19 Thread Christophe JAILLET
Some statements are not enough or too much indented. Fix it to improve readalbility. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/neterion/vxge/vxge-main.c | 37 +- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet

[PATCH] crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()'

2017-11-18 Thread Christophe JAILLET
'dev' is leaking in the error handling path of 'hifn_probe()'. Add a 'kfree(dev)' to match the code in 'hifn_remove()' Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/crypto/hifn_795x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hifn_

[PATCH] crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()'

2017-11-18 Thread Christophe JAILLET
'dev' is leaking in the error handling path of 'hifn_probe()'. Add a 'kfree(dev)' to match the code in 'hifn_remove()' Signed-off-by: Christophe JAILLET --- drivers/crypto/hifn_795x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c

[PATCH] mtd: onenand: Fix an error handling path in 's3c_onenand_probe(()'

2017-11-18 Thread Christophe JAILLET
If 'platform_get_resource()' fails, we have to go through the error handling path to release some resources. The unreachable 'goto ahb_resource_failed' is also wrong here and we should go to 'resource_failed' instead. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- d

[PATCH] mtd: onenand: Fix an error handling path in 's3c_onenand_probe(()'

2017-11-18 Thread Christophe JAILLET
If 'platform_get_resource()' fails, we have to go through the error handling path to release some resources. The unreachable 'goto ahb_resource_failed' is also wrong here and we should go to 'resource_failed' instead. Signed-off-by: Christophe JAILLET --- drivers/mtd/onenand/samsung.c | 4

[PATCH] dmaengine: ioat: Fix error handling path

2017-11-17 Thread Christophe JAILLET
If the last test in 'ioat_dma_self_test()' fails, we must release all the allocated resources and not just part of them. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/dma/ioat/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH] dmaengine: ioat: Fix error handling path

2017-11-17 Thread Christophe JAILLET
If the last test in 'ioat_dma_self_test()' fails, we must release all the allocated resources and not just part of them. Signed-off-by: Christophe JAILLET --- drivers/dma/ioat/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat

[PATCH] remoteproc: qcom: Fix error handling paths in order to avoid memory leaks

2017-11-14 Thread Christophe JAILLET
()', as already done in the other error handling paths of the function. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- We could certainly also propagate the error code returned by 'q6v5_xfer_mem_ownership()' instead of returning an unconditional -EAGAIN. No

[PATCH] remoteproc: qcom: Fix error handling paths in order to avoid memory leaks

2017-11-14 Thread Christophe JAILLET
()', as already done in the other error handling paths of the function. Signed-off-by: Christophe JAILLET --- We could certainly also propagate the error code returned by 'q6v5_xfer_mem_ownership()' instead of returning an unconditional -EAGAIN. Not sure of the potential impacts, so I've left

Re: [PATCH 2/4] fsl/fman: Remove some useless code

2017-11-06 Thread Christophe JAILLET
Le 06/11/2017 à 22:53, Christophe JAILLET a écrit : There is no need to release explicitly some devm_ allocated resources. If the 'mac_probe()' probe function fails, they will be released automatically, as already done in the other error handling paths of this function. Also goto

Re: [PATCH 2/4] fsl/fman: Remove some useless code

2017-11-06 Thread Christophe JAILLET
Le 06/11/2017 à 22:53, Christophe JAILLET a écrit : There is no need to release explicitly some devm_ allocated resources. If the 'mac_probe()' probe function fails, they will be released automatically, as already done in the other error handling paths of this function. Also goto

[PATCH 1/4] fsl/fman: Remove a useless call to 'dev_set_drvdata()'

2017-11-06 Thread Christophe JAILLET
Commit c6e26ea8c893 ("dpaa_eth: change device used") has removed usage of 'dev_set_drvdata()' in the 'mac_probe() function. This call should also be axed. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/net/ethernet/freescale/fman/mac.c | 1 - 1

[PATCH 1/4] fsl/fman: Remove a useless call to 'dev_set_drvdata()'

2017-11-06 Thread Christophe JAILLET
Commit c6e26ea8c893 ("dpaa_eth: change device used") has removed usage of 'dev_set_drvdata()' in the 'mac_probe() function. This call should also be axed. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 3/4] fsl/fman: Add a missing 'of_node_put()' call in an error handling path

2017-11-06 Thread Christophe JAILLET
If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()' call, as done the the following error handling code. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/net/ethernet/freescale/fman/mac.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 3/4] fsl/fman: Add a missing 'of_node_put()' call in an error handling path

2017-11-06 Thread Christophe JAILLET
If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()' call, as done the the following error handling code. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/fman/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/fman

[PATCH 4/4] fsl/fman: Remove a useless 'dev_err()' call

2017-11-06 Thread Christophe JAILLET
Memory allocation functions already display some informaton in case of memory allocation failure. There is no need to add an extra 'dev_err' here. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 de

[PATCH 4/4] fsl/fman: Remove a useless 'dev_err()' call

2017-11-06 Thread Christophe JAILLET
Memory allocation functions already display some informaton in case of memory allocation failure. There is no need to add an extra 'dev_err' here. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net

[PATCH 2/4] fsl/fman: Remove some useless code

2017-11-06 Thread Christophe JAILLET
. This is useless (priv->fixed_link is NULL at this point), but at least it is consistent. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/net/ethernet/freescale/fman/mac.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net

[PATCH 2/4] fsl/fman: Remove some useless code

2017-11-06 Thread Christophe JAILLET
. This is useless (priv->fixed_link is NULL at this point), but at least it is consistent. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/fman/mac.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/

[PATCH 0/4] fsl/fman: Fix some error handling code in mac_probe

2017-11-06 Thread Christophe JAILLET
dling path in the function. The 2nd one removes some devm_iounmap/release/kfree functions which look useless to me. The 3rd one fixes a missing of_node_put. The 4th one is just cosmetic and removes a useless message. Christophe JAILLET (4): fsl/fman: Remove a useless call to 'dev_set_drvdata()'

[PATCH 0/4] fsl/fman: Fix some error handling code in mac_probe

2017-11-06 Thread Christophe JAILLET
dling path in the function. The 2nd one removes some devm_iounmap/release/kfree functions which look useless to me. The 3rd one fixes a missing of_node_put. The 4th one is just cosmetic and removes a useless message. Christophe JAILLET (4): fsl/fman: Remove a useless call to 'dev_set_drvdata()'

Re: [PATCH] mtd: lpddr: Fix a potential double mutex_lock

2017-11-03 Thread Christophe JAILLET
Le 31/10/2017 à 15:58, Boris Brezillon a écrit : Hi Christophe, On Sun, 22 Oct 2017 10:28:31 +0200 Christophe JAILLET <christophe.jail...@wanadoo.fr> wrote: If 'chip->state == FL_SYNCING', we will 'goto retry' with the mutex '>lock' already taken. In such a case, the 'mutex_lock'

Re: [PATCH] mtd: lpddr: Fix a potential double mutex_lock

2017-11-03 Thread Christophe JAILLET
Le 31/10/2017 à 15:58, Boris Brezillon a écrit : Hi Christophe, On Sun, 22 Oct 2017 10:28:31 +0200 Christophe JAILLET wrote: If 'chip->state == FL_SYNCING', we will 'goto retry' with the mutex '>lock' already taken. In such a case, the 'mutex_lock' at line 927 can never succeed. In

[tip:perf/core] perf kmem: Perform some cleanup if '--time' is given an invalid value

2017-10-24 Thread tip-bot for Christophe JAILLET
Commit-ID: 79f56ebe2ae33aa54c69bbc9854a9a31f622913e Gitweb: https://git.kernel.org/tip/79f56ebe2ae33aa54c69bbc9854a9a31f622913e Author: Christophe JAILLET <christophe.jail...@wanadoo.fr> AuthorDate: Sat, 16 Sep 2017 08:09:36 +0200 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] perf kmem: Perform some cleanup if '--time' is given an invalid value

2017-10-24 Thread tip-bot for Christophe JAILLET
Commit-ID: 79f56ebe2ae33aa54c69bbc9854a9a31f622913e Gitweb: https://git.kernel.org/tip/79f56ebe2ae33aa54c69bbc9854a9a31f622913e Author: Christophe JAILLET AuthorDate: Sat, 16 Sep 2017 08:09:36 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 23 Oct 2017 16:30:53 -0300 perf

[tip:perf/core] perf script: Fix error handling path

2017-10-24 Thread tip-bot for Christophe JAILLET
Commit-ID: db49bc155ad9f04ea3c4e1c9ae87850610feb1ce Gitweb: https://git.kernel.org/tip/db49bc155ad9f04ea3c4e1c9ae87850610feb1ce Author: Christophe JAILLET <christophe.jail...@wanadoo.fr> AuthorDate: Sat, 16 Sep 2017 08:25:37 +0200 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] perf script: Fix error handling path

2017-10-24 Thread tip-bot for Christophe JAILLET
Commit-ID: db49bc155ad9f04ea3c4e1c9ae87850610feb1ce Gitweb: https://git.kernel.org/tip/db49bc155ad9f04ea3c4e1c9ae87850610feb1ce Author: Christophe JAILLET AuthorDate: Sat, 16 Sep 2017 08:25:37 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 23 Oct 2017 16:30:53 -0300 perf

[PATCH V2] scsi: aacraid: Fix some error code

2017-10-23 Thread Christophe JAILLET
If 'scsi_host_alloc', 'kzalloc' or '(*aac_drivers[index].init)' fail, the function will return 0, because 'error' is known to be 0 at this point. Return -ENOMEM in the 2 first cases and -ENODEV in the third one. This patch also removes a useless 'error = -ENODEV'. Signed-off-by: Christophe

[PATCH V2] scsi: aacraid: Fix some error code

2017-10-23 Thread Christophe JAILLET
If 'scsi_host_alloc', 'kzalloc' or '(*aac_drivers[index].init)' fail, the function will return 0, because 'error' is known to be 0 at this point. Return -ENOMEM in the 2 first cases and -ENODEV in the third one. This patch also removes a useless 'error = -ENODEV'. Signed-off-by: Christophe

[PATCH] mtd: lpddr: Fix a potential double mutex_lock

2017-10-22 Thread Christophe JAILLET
DR Command set driver") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Review carefuly, untested. --- drivers/mtd/lpddr/lpddr_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_

[PATCH] mtd: lpddr: Fix a potential double mutex_lock

2017-10-22 Thread Christophe JAILLET
DR Command set driver") Signed-off-by: Christophe JAILLET --- Review carefuly, untested. --- drivers/mtd/lpddr/lpddr_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 018c75faadb3..830dd0855ab3 10064

[PATCH] mtd: cfi_cmdset_0001: Fix a potential double mutex_lock

2017-10-22 Thread Christophe JAILLET
MTD] [NOR] fix cfi_cmdset_0001 FL_SYNCING race (take 2)") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Review carefuly, untested. --- drivers/mtd/chips/cfi_cmdset_0001.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/chips/cfi_cmdset_00

[PATCH] mtd: cfi_cmdset_0001: Fix a potential double mutex_lock

2017-10-22 Thread Christophe JAILLET
MTD] [NOR] fix cfi_cmdset_0001 FL_SYNCING race (take 2)") Signed-off-by: Christophe JAILLET --- Review carefuly, untested. --- drivers/mtd/chips/cfi_cmdset_0001.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c

[PATCH] bug-hunting.rst: Fix an example and a typo in a Sphinx tag

2017-10-20 Thread Christophe JAILLET
- Use the same file name in the explanation and in the example (conex.c vs sonixj.c) - Add a missing ':' in a :ref: tag which leads to incorrect Shpinx output - Add some missing ',' and ';' Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Documentation/admin-gui

[PATCH] bug-hunting.rst: Fix an example and a typo in a Sphinx tag

2017-10-20 Thread Christophe JAILLET
- Use the same file name in the explanation and in the example (conex.c vs sonixj.c) - Add a missing ':' in a :ref: tag which leads to incorrect Shpinx output - Add some missing ',' and ';' Signed-off-by: Christophe JAILLET --- Documentation/admin-guide/bug-hunting.rst | 8 1 file

[PATCH] umh: Optimize 'proc_cap_handler()'

2017-10-20 Thread Christophe JAILLET
If 'write' is 0, we can avoid a call to spin_lock/spin_unlock. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- kernel/umh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/umh.c b/kernel/umh.c index 6ff9905250ff..18e5fa4b0e71

[PATCH] umh: Optimize 'proc_cap_handler()'

2017-10-20 Thread Christophe JAILLET
If 'write' is 0, we can avoid a call to spin_lock/spin_unlock. Signed-off-by: Christophe JAILLET --- kernel/umh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/umh.c b/kernel/umh.c index 6ff9905250ff..18e5fa4b0e71 100644 --- a/kernel/umh.c +++ b/kernel/umh.c

[PATCH 2/8] video: fbdev: au1200fb: Return an error code if a memory allocation fails

2017-10-16 Thread Christophe JAILLET
'ret' is known to be 0 at this point. In case of memory allocation error in 'framebuffer_alloc()', return -ENOMEM instead. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 2/8] video: fbdev: au1200fb: Return an error code if a memory allocation fails

2017-10-16 Thread Christophe JAILLET
'ret' is known to be 0 at this point. In case of memory allocation error in 'framebuffer_alloc()', return -ENOMEM instead. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/au1200fb.c b

[PATCH 1/8] video: fbdev: au1200fb: Fix a potential double free

2017-10-16 Thread Christophe JAILLET
alette'. Fix it by letting the caller free all resources in case of failure in 'au1200fb_init_fbinfo()'. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/au1200fb.c b/d

[PATCH 1/8] video: fbdev: au1200fb: Fix a potential double free

2017-10-16 Thread Christophe JAILLET
alette'. Fix it by letting the caller free all resources in case of failure in 'au1200fb_init_fbinfo()'. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c

[PATCH 5/8] video: fbdev: au1200fb: Fix error handling path

2017-10-16 Thread Christophe JAILLET
know that we have released all what we needed to release. So we can 'break'. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/au1200

[PATCH 6/8] video: fbdev: au1200fb: Remove some dead code

2017-10-16 Thread Christophe JAILLET
There is no need to shut gcc up. It should not complain. Axe 'fbdev', it is never used in this function. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/video/fbdev/au1200

[PATCH 5/8] video: fbdev: au1200fb: Fix error handling path

2017-10-16 Thread Christophe JAILLET
know that we have released all what we needed to release. So we can 'break'. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c

[PATCH 6/8] video: fbdev: au1200fb: Remove some dead code

2017-10-16 Thread Christophe JAILLET
There is no need to shut gcc up. It should not complain. Axe 'fbdev', it is never used in this function. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c

[PATCH 4/8] video: fbdev: au1200fb: Fix error handling path

2017-10-16 Thread Christophe JAILLET
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index cf54168d44dc..0d8ed0ef9183 100644 --- a/drivers/video/fbdev/au1200fb.c +++

[PATCH 4/8] video: fbdev: au1200fb: Fix error handling path

2017-10-16 Thread Christophe JAILLET
Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index cf54168d44dc..0d8ed0ef9183 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c @@ -1766

[PATCH 3/8] video: fbdev: au1200fb: Release some resources if a memory allocation fails

2017-10-16 Thread Christophe JAILLET
We should go through the error handling code instead of returning -ENOMEM directly. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/au1200fb.c b/d

[PATCH 3/8] video: fbdev: au1200fb: Release some resources if a memory allocation fails

2017-10-16 Thread Christophe JAILLET
We should go through the error handling code instead of returning -ENOMEM directly. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index

[PATCH 0/8] video: fbdev: au1200fb: Fix error handling path of 'au1200fb_drv_probe()'

2017-10-16 Thread Christophe JAILLET
. This serie already goes further that the fixes I usually provide, so please excuse me if I missed something or if it is somehow broken and/or incomplete. --- V1 previously posted is patch 3/8 of this serie Christophe JAILLET (8): video: fbdev: au1200fb: Fix a potential double free video: fbdev

[PATCH 0/8] video: fbdev: au1200fb: Fix error handling path of 'au1200fb_drv_probe()'

2017-10-16 Thread Christophe JAILLET
. This serie already goes further that the fixes I usually provide, so please excuse me if I missed something or if it is somehow broken and/or incomplete. --- V1 previously posted is patch 3/8 of this serie Christophe JAILLET (8): video: fbdev: au1200fb: Fix a potential double free video: fbdev

[PATCH 8/8] video: fbdev: au1200fb: Style clean up

2017-10-16 Thread Christophe JAILLET
Style clean-up. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 687ea2a8f810..87d5a62bf6ca

[PATCH 8/8] video: fbdev: au1200fb: Style clean up

2017-10-16 Thread Christophe JAILLET
Style clean-up. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 687ea2a8f810..87d5a62bf6ca 100644 --- a/drivers/video/fbdev

[PATCH 7/8] video: fbdev: au1200fb: Propagate an error code

2017-10-16 Thread Christophe JAILLET
We should propagate the error code returned by 'fb_alloc_cmap()' instead of returning -EFAULT. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/video/fbdev/au1200fb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/video

[PATCH 7/8] video: fbdev: au1200fb: Propagate an error code

2017-10-16 Thread Christophe JAILLET
We should propagate the error code returned by 'fb_alloc_cmap()' instead of returning -EFAULT. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/au1200fb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev

Re: [PATCH] video: fbdev: Fix an errro handling path in 'au1200fb_drv_probe()'

2017-10-15 Thread Christophe JAILLET
Le 12/10/2017 à 18:25, Bartlomiej Zolnierkiewicz a écrit : [ added dri-devel ML to cc: ] On Tuesday, September 12, 2017 07:39:30 AM Christophe JAILLET wrote: If 'dmam_alloc_attrs()' fails, we must go through the error handling code, as done elsewhere in this function. Otherwise

Re: [PATCH] video: fbdev: Fix an errro handling path in 'au1200fb_drv_probe()'

2017-10-15 Thread Christophe JAILLET
Le 12/10/2017 à 18:25, Bartlomiej Zolnierkiewicz a écrit : [ added dri-devel ML to cc: ] On Tuesday, September 12, 2017 07:39:30 AM Christophe JAILLET wrote: If 'dmam_alloc_attrs()' fails, we must go through the error handling code, as done elsewhere in this function. Otherwise

Re: [PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-10 Thread Christophe JAILLET
Le 09/10/2017 à 23:22, walter harms a écrit : Am 08.10.2017 11:39, schrieb Christophe JAILLET: All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher&quo

Re: [PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-10 Thread Christophe JAILLET
Le 09/10/2017 à 23:22, walter harms a écrit : Am 08.10.2017 11:39, schrieb Christophe JAILLET: All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher&quo

[PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-08 Thread Christophe JAILLET
All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- crypto/lrw.c |

[PATCH 2/2] crypto: lrw - Check for incorrect cipher name

2017-10-08 Thread Christophe JAILLET
If the cipher name does not start with 'ecb(' we should bail out, as done in the 'create()' function in 'crypto/xts.c'. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- This patch is 100% speculat

[PATCH 1/2] crypto: lrw - Fix an error handling path in 'create()'

2017-10-08 Thread Christophe JAILLET
All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET --- crypto/lrw.c | 6 -- 1 file changed, 4 insert

[PATCH 2/2] crypto: lrw - Check for incorrect cipher name

2017-10-08 Thread Christophe JAILLET
If the cipher name does not start with 'ecb(' we should bail out, as done in the 'create()' function in 'crypto/xts.c'. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET --- This patch is 100% speculative. It is based on comparison with t

[PATCH 0/2] crypto: lrw - Fixes for the 'create()' function

2017-10-08 Thread Christophe JAILLET
nd 'crypto/lrw.c' look very similar. However, there is one more sanity check in xts. This patch proposes to add the same test in lrw. Not sure at all if correct! I just send it for consistency. Christophe JAILLET (2): crypto: lrw - Fix an error handling path in 'create()' crypto: lrw - Check for

[PATCH 0/2] crypto: lrw - Fixes for the 'create()' function

2017-10-08 Thread Christophe JAILLET
nd 'crypto/lrw.c' look very similar. However, there is one more sanity check in xts. This patch proposes to add the same test in lrw. Not sure at all if correct! I just send it for consistency. Christophe JAILLET (2): crypto: lrw - Fix an error handling path in 'create()' crypto: lrw - Check for

[PATCH] SMB3: Fix resource leak if an unexpected dialect is returned

2017-09-30 Thread Christophe JAILLET
If we receive an unexpected dialect, we must free some resources before returning. Branch to the existing error hangling path to fix it. Fixes: 9764c02fcbad ("SMB3: Add support for multidialect negotiate (SMB2.1 and later)") Signed-off-by: Christophe JAILLET <christophe.jail.

[PATCH] SMB3: Fix resource leak if an unexpected dialect is returned

2017-09-30 Thread Christophe JAILLET
If we receive an unexpected dialect, we must free some resources before returning. Branch to the existing error hangling path to fix it. Fixes: 9764c02fcbad ("SMB3: Add support for multidialect negotiate (SMB2.1 and later)") Signed-off-by: Christophe JAILLET --- fs/cifs/smb2

[PATCH] net: hns3: Fix an error handling path in 'hclge_rss_init_hw()'

2017-09-29 Thread Christophe JAILLET
If this sanity check fails, we must free 'rss_indir'. Otherwise there is a memory leak. 'goto err' as done in the other error handling paths to fix it. Fixes: 46a3df9f9718 ("net: hns3: Fix for setting rss_size incorrectly") Signed-off-by: Christophe JAILLET <christophe.jail.

[PATCH] net: hns3: Fix an error handling path in 'hclge_rss_init_hw()'

2017-09-29 Thread Christophe JAILLET
If this sanity check fails, we must free 'rss_indir'. Otherwise there is a memory leak. 'goto err' as done in the other error handling paths to fix it. Fixes: 46a3df9f9718 ("net: hns3: Fix for setting rss_size incorrectly") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet

[PATCH] crypto: xts - Fix an error handling path in 'create()'

2017-09-26 Thread Christophe JAILLET
All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- crypto/xts.c |

[PATCH] crypto: xts - Fix an error handling path in 'create()'

2017-09-26 Thread Christophe JAILLET
All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher") Signed-off-by: Christophe JAILLET --- crypto/xts.c | 6 -- 1 file changed, 4 insert

[PATCH] dmaengine: imx-sdma: Report a DMA_ERROR in status if 'count' or 'dma_address' do not match DMA_SLAVE_BUSWIDTH

2017-09-24 Thread Christophe JAILLET
All sanity checks in this function set 'sdmac->status = DMA_ERROR' if something looks wrong, except if the byte count or the address don't match the bus width. Fix it and report the error in status in such a case. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Unt

[PATCH] dmaengine: imx-sdma: Report a DMA_ERROR in status if 'count' or 'dma_address' do not match DMA_SLAVE_BUSWIDTH

2017-09-24 Thread Christophe JAILLET
All sanity checks in this function set 'sdmac->status = DMA_ERROR' if something looks wrong, except if the byte count or the address don't match the bus width. Fix it and report the error in status in such a case. Signed-off-by: Christophe JAILLET --- Untested, so please review caref

[PATCH] drm/omap: Fix error handling path in 'omap_dmm_probe()'

2017-09-24 Thread Christophe JAILLET
If we don't find a matching device node, we must free the memory allocated in 'omap_dmm' a few lines above. Fixes: 7cb0d6c17b96 ("drm/omap: fix TILER on OMAP5") Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 ++-

[PATCH] drm/omap: Fix error handling path in 'omap_dmm_probe()'

2017-09-24 Thread Christophe JAILLET
If we don't find a matching device node, we must free the memory allocated in 'omap_dmm' a few lines above. Fixes: 7cb0d6c17b96 ("drm/omap: fix TILER on OMAP5") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH] kfifo: Fix some typo

2017-09-23 Thread Christophe JAILLET
Fix some typo. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- include/linux/kfifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 41eb6fdf87a8..7b45959ebd92 100644 --- a/include/linux/k

[PATCH] kfifo: Fix some typo

2017-09-23 Thread Christophe JAILLET
Fix some typo. Signed-off-by: Christophe JAILLET --- include/linux/kfifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 41eb6fdf87a8..7b45959ebd92 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h

[PATCH] hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()'

2017-09-23 Thread Christophe JAILLET
to 'out_mbox_free' - 'goto out_mbox_free' must be replaced by 'goto out', otherwise the '[pcc_]mbox_free_channel()' call will be missed. Fixes: 2ca492e22cb7 ("hwmon: (xgene) Fix crash when alarm occurs before driver probe") Signed-off-by: Christophe JAILLET <christophe.jail.

<    3   4   5   6   7   8   9   10   11   12   >