}
buf = kmalloc(64 * 512, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return STATUS_ERROR;
}
size = ms_card->segment_cnt * sizeof(struct zone_entry);
ms_card->segment = vzalloc(size);
- if (ms_card->segment == NULL) {
+ if (!ms_card->segment) {
rtsx_trace(chip);
return STATUS_FAIL;
}
if (segment->l2p_table == NULL) {
segment->l2p_table = vmalloc(table_size * 2);
- if (segment->l2p_table == NULL) {
+ if (!segment->l2p_table) {
rtsx_trace(chip);
goto BUILD_FAIL;
}
if (segment->free_table == NULL) {
segment->free_table = vmalloc(MS_FREE_TABLE_CNT * 2);
- if (segment->free_table == NULL) {
+ if (!segment->free_table) {
rtsx_trace(chip);
goto BUILD_FAIL;
}
memset(dev, 0, sizeof(struct rtsx_dev));
dev->chip = kzalloc(sizeof(struct rtsx_chip), GFP_KERNEL);
- if (dev->chip == NULL) {
+ if (!dev->chip) {
err = -ENOMEM;
goto errout;
}
(unsigned int)pci_resource_len(pci, 0));
dev->addr = pci_resource_start(pci, 0);
dev->remap_addr = ioremap_nocache(dev->addr, pci_resource_len(pci, 0));
- if (dev->remap_addr == NULL) {
+ if (!dev->remap_addr) {
dev_err(&pci->dev, "ioremap error\n");
err = -ENXIO;
goto errout;
dev->rtsx_resv_buf = dmam_alloc_coherent(&pci->dev, RTSX_RESV_BUF_LEN,
&dev->rtsx_resv_buf_addr, GFP_KERNEL);
- if (dev->rtsx_resv_buf == NULL) {
+ if (!dev->rtsx_resv_buf) {
dev_err(&pci->dev, "alloc dma buffer fail\n");
err = -ENXIO;
goto errout;
}
buf = vmalloc(scsi_bufflen(srb));
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
}
buf = vmalloc(scsi_bufflen(srb));
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
#endif
buf = kmalloc(dataSize, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
buf_len = (scsi_bufflen(srb) > 12) ? 0x14 : 12;
buf = kmalloc(buf_len, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
}
buf = kmalloc(8, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb),
len);
buf = vmalloc(len);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len);
buf = vmalloc(len);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
clear = srb->cmnd[2];
buf = vmalloc(scsi_bufflen(srb));
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
len);
buf = vmalloc(len);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len);
buf = vmalloc(len);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
len = (u8)min_t(unsigned int, scsi_bufflen(srb), len);
buf = vmalloc(len);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
cmd[4] = srb->cmnd[6];
buf = kmalloc(data_len, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
u8 *buf;
buf = kmalloc(data_len, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return TRANSPORT_ERROR;
}
}
buf = kmalloc(SF_PAGE_LEN, GFP_KERNEL);
- if (buf == NULL) {
+ if (!buf) {
rtsx_trace(chip);
return STATUS_ERROR;
}
if (zone->l2p_table == NULL) {
zone->l2p_table = vmalloc(2000);
- if (zone->l2p_table == NULL) {
+ if (!zone->l2p_table) {
rtsx_trace(chip);
goto Build_Fail;
}
if (zone->free_table == NULL) {
zone->free_table = vmalloc(XD_FREE_TABLE_CNT * 2);
- if (zone->free_table == NULL) {
+ if (!zone->free_table) {
rtsx_trace(chip);
goto Build_Fail;
}