[PATCH V3] [media] mantis: fix error handling

2015-03-23 Thread Silvan Jegen
: Silvan Jegen --- V3 Changes (due to Dan Carpenter's and Walter Harms' reviews): - return -ENOMEM/0 directly - remove dprintk calls in the error handling part V2 Changes (due to Dan Carpenter's review): - Remove dead code, do not activate it - Make goto labels

[PATCH v2] [media] mantis: fix error handling

2015-03-22 Thread Silvan Jegen
: Silvan Jegen --- V2 Changes (due to Dan Carpenter's review): - Remove dead code, do not activate it - Make goto labels more expressive - Add a call to mantis_dvb_exit drivers/media/pci/mantis/mantis_cards.c | 33 - 1 file changed, 16 inser

Re: [PATCH 1/2] [media] mantis: Move jump label to activate dead code

2015-02-17 Thread Silvan Jegen
Thanks for the review, Dan! On Mon, Feb 16, 2015 at 10:04 AM, Dan Carpenter wrote: > On Sun, Feb 15, 2015 at 01:11:04PM +0100, Silvan Jegen wrote: >> diff --git a/drivers/media/pci/mantis/mantis_cards.c >> b/drivers/media/pci/mantis/mantis_cards.c >> index 801fc55..e5

[PATCH 0/2] [media] mantis: Fix goto labels

2015-02-15 Thread Silvan Jegen
I found two issues regarding goto labels in the mantis driver when checking a smatch warning and addressed them in two separate patches. Please be aware that these patches have only been compile-tested since I do not have access to the corresponding hardware. Silvan Jegen (2): [media] mantis

[PATCH 1/2] [media] mantis: Move jump label to activate dead code

2015-02-15 Thread Silvan Jegen
Due to a misplaced goto label mantis_uart_exit is never called. Adjusting the label position (while correcting its numbering) changes this. This issue was found using the smatch static checker. Signed-off-by: Silvan Jegen --- drivers/media/pci/mantis/mantis_cards.c | 5 +++-- 1 file changed

[PATCH 2/2] [media] mantis: Use correct goto labels for cleanup on error

2015-02-15 Thread Silvan Jegen
-by: Silvan Jegen --- drivers/media/pci/mantis/mantis_cards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c index e566061..71497d8 100644 --- a/drivers/media/pci/mantis/mantis_cards.c +++ b