Fix most warnings from Sparse

git-svn-id: svn://coreboot.org/openbios/openbios-devel@274 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-11-30 11:54:01 +00:00
parent c52d26b976
commit bf0c6b1c38
51 changed files with 186 additions and 166 deletions

View File

@@ -62,7 +62,7 @@ typedef struct esp_private {
sd_private_t sd[8];
} esp_private_t;
esp_private_t *global_esp;
static esp_private_t *global_esp;
/* DECLARE data structures for the nodes. */
DECLARE_UNNAMED_NODE(ob_sd, INSTALL_OPEN, sizeof(sd_private_t *));
@@ -304,7 +304,7 @@ espdma_init(unsigned int slot, uint64_t base, unsigned long offset,
{
espdma->regs = (void *)map_io(base + (uint64_t)offset, 0x10);
if (espdma->regs == 0) {
if (espdma->regs == NULL) {
DPRINTF("espdma_init: cannot map registers\n");
return -1;
}
@@ -437,7 +437,7 @@ ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset,
/* Get the IO region */
esp->ll = (void *)map_io(base + (uint64_t)espoffset,
sizeof(struct esp_regs));
if (esp->ll == 0) {
if (esp->ll == NULL) {
DPRINTF("Can't map ESP registers\n");
return -1;
}