atp870u: Improve _probe()
authorOndrej Zary <linux@rainbow-software.org>
Tue, 17 Nov 2015 18:24:17 +0000 (19:24 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 26 Nov 2015 03:08:48 +0000 (22:08 -0500)
commitbdd5ac4065dbc2bb1478ae0c9205a651487c7432
tree93ba4b17548f4a6c014d5c4bfcac8a7c651fd26e
parente1e9a70642309020571a07b2918eca84cec6287a
atp870u: Improve _probe()

Move scsi_host_alloc() to the top of _probe() to remove code duplication,
*p and unneeded atpdev (de)allocation and copying.  While at it, fix the
error paths to return real error codes and also add missing
pci_disble_device() call.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/atp870u.c