linux/drivers/staging/unisys
Tapasweni Pathak be40a5e29e staging: unisys: visorchannel: Improved cleanup code
kfree on NULL pointer is a no-op.

This patch used the following semantic patch to find an instance where NULL
check is present before kfree

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Code is made more simpler by breaking up of sequence of kmallocs and adding
some more exit labels.
Removed unnecessary initialization of buf and fmtbuf to NULL as they are local
variables.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 15:41:43 +08:00
..
channels staging: unisys: refactor SignalRemoveAll() 2014-10-27 10:33:10 +08:00
common-spar/include staging: unisys: refactor struct struct ultra_vbus_channel_protocol 2014-10-27 10:33:15 +08:00
Documentation staging: unisys: ABI documentation for new sysfs entries 2014-07-24 15:07:59 -07:00
include staging: unisys: refactor CONTROLVM_MESSAGE_PACKET 2014-10-27 10:33:11 +08:00
uislib staging: unisys: fix parameters for SPAR_VBUS_CHANNEL_OK_CLIENT macro 2014-10-27 10:33:15 +08:00
virthba staging: unisys: fix CamelCase in uiscmdrsp_disknotify 2014-10-27 10:33:14 +08:00
virtpci staging: unisys: refactor struct struct ultra_vbus_channel_protocol 2014-10-27 10:33:15 +08:00
visorchannel staging: unisys: visorchannel: Improved cleanup code 2014-10-28 15:41:43 +08:00
visorchipset staging: unisys: refactor ULTRA_CONTROLVM_PARAMETERS_HEADER 2014-10-27 10:33:12 +08:00
visorutil Staging: unisys: visorutil: easyproc: fixed a line over 80 characters coding style issue 2014-10-27 10:33:07 +08:00
Kconfig Staging: unisys Remove BROKEN from Kconfig to allow compilation 2014-06-26 20:16:39 -04:00
MAINTAINERS staging: s-Par driver documentation 2014-03-04 17:04:28 -08:00
Makefile staging: virthba driver to access shared SCSI hba 2014-03-04 17:03:22 -08:00
TODO staging: unisys: update MAINTAINERS and TODO 2014-03-08 22:42:14 -08:00