]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aacraid: Fix error handling paths in aac_probe_one()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 12 Apr 2020 09:40:39 +0000 (11:40 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 27 Apr 2020 22:39:53 +0000 (18:39 -0400)
commitab6a2f35bd7007b93ae463723a62bf881e53445f
tree0e5188d14368c652e8a59801099a85b09cbedf71
parentad60676d1f49a7976cd776fd9c943dc6243d9686
scsi: aacraid: Fix error handling paths in aac_probe_one()

If 'scsi_host_alloc()' or 'kcalloc()' fail, 'error' is known to be 0. Set
it explicitly to -ENOMEM before branching to the error handling path.

While at it, remove 2 useless assignments to 'error'. These values are
overwridden a few lines later.

Link: https://lore.kernel.org/r/20200412094039.8822-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/linit.c