summaryrefslogtreecommitdiff
path: root/drivers/staging/slicoss
diff options
context:
space:
mode:
authorRehas Sachdeva <aquannie@gmail.com>2016-09-21 21:36:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-22 12:54:48 +0300
commit7725066f1b4dd7fe69d85bf2a276f01d048cb967 (patch)
tree72e8c46b6736513b3a409681685d84c0d9ca6b47 /drivers/staging/slicoss
parent7d359a847cf65cafa3582ee0c52f68e629fe0547 (diff)
downloadlinux-7725066f1b4dd7fe69d85bf2a276f01d048cb967.tar.xz
staging: slicoss: Move NULL test closer to assignment
Move the test to check if a variable is NULL, to right after it is being assigned, rather than some statements later. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r--drivers/staging/slicoss/slicoss.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 714e6e19d76f..062307ad7fed 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2617,15 +2617,15 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
sizeof(struct slic_eeprom),
&phys_config);
- phys_configl = SLIC_GET_ADDR_LOW(phys_config);
- phys_configh = SLIC_GET_ADDR_HIGH(phys_config);
-
if (!peeprom) {
dev_err(&adapter->pcidev->dev,
"Failed to allocate DMA memory for EEPROM.\n");
return -ENOMEM;
}
+ phys_configl = SLIC_GET_ADDR_LOW(phys_config);
+ phys_configh = SLIC_GET_ADDR_HIGH(phys_config);
+
memset(peeprom, 0, sizeof(struct slic_eeprom));
slic_write32(adapter, SLIC_REG_ICR, ICR_INT_OFF);