WSL2-Linux-Kernel/drivers/message/fusion
Julia Lawall 1c1acab036 [SCSI] drivers/message/fusion: Return -ENOMEM on memory allocation failure
In this code, 0 is returned on memory allocation failure, even though other
failures return -ENOMEM or other similar values.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-05 14:55:57 -03:00
..
lsi trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
Kconfig [SCSI] mpt fusion: Kconfig cleanup 2007-10-12 14:48:53 -04:00
Makefile [SCSI] mpt fusion: logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h 2007-07-28 11:25:35 -04:00
mptbase.c [SCSI] drivers/message/fusion: Return -ENOMEM on memory allocation failure 2010-09-05 14:55:57 -03:00
mptbase.h mpt fusion: convert to seq_file 2010-08-11 08:59:00 -07:00
mptctl.c [SCSI] mptfusion: Extra debug prints added relavent to Device missing delay error handling 2010-07-28 09:07:47 -05:00
mptctl.h [SCSI] mpt fusion : Updated copyright statment with 2008 included 2008-06-05 09:27:17 -05:00
mptdebug.h [SCSI] mpt fusion: Fixing 1078 data corruption issue for 36GB memory region 2009-06-09 17:21:31 -05:00
mptfc.c [SCSI] mptfusion: Extra debug prints added relavent to Device missing delay error handling 2010-07-28 09:07:47 -05:00
mptlan.c [SCSI] mptfusion: Extra debug prints added relavent to Device missing delay error handling 2010-07-28 09:07:47 -05:00
mptlan.h mptlan: Kill directly reference of netdev->priv 2008-12-03 21:13:37 -08:00
mptsas.c [SCSI] mptfusion: Extra debug prints added relavent to Device missing delay error handling 2010-07-28 09:07:47 -05:00
mptsas.h [SCSI] mptfusion: Added sanity to check B_T mapping for device before adding to OS 2010-07-27 12:02:32 -05:00
mptscsih.c [SCSI] mptfusion: Block Error handling for deleting devices or Device in DMD 2010-07-28 09:07:46 -05:00
mptscsih.h [SCSI] modify change_queue_depth to take in reason why it is being called 2009-12-04 12:00:41 -06:00
mptspi.c [SCSI] mptfusion: Extra debug prints added relavent to Device missing delay error handling 2010-07-28 09:07:47 -05:00