diff options
author | Navya Sri Nizamkari <navyasri.tech@gmail.com> | 2015-10-22 22:18:26 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-24 19:11:30 -0700 |
commit | 076e235856d1fbb026fd13dbf9139efb86a7b496 (patch) | |
tree | 3c0c19a167e0118d042c55a69c040a242e294a53 /drivers/staging/xgifb | |
parent | 0d46afbce659f8ca4feef61451c719275698e7fc (diff) |
Staging: xgifb: Fix comparison to NULL warning
Change comparison to NULL to a ! operation.
Found using checkpatch.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r-- | drivers/staging/xgifb/vb_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index af91523592fe..be30c13359e5 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -850,11 +850,11 @@ static u8 *xgifb_copy_rom(struct pci_dev *dev, size_t *rom_size) u8 *rom_copy; rom_address = pci_map_rom(dev, rom_size); - if (rom_address == NULL) + if (!rom_address) return NULL; rom_copy = vzalloc(XGIFB_ROM_SIZE); - if (rom_copy == NULL) + if (!rom_copy) goto done; *rom_size = min_t(size_t, *rom_size, XGIFB_ROM_SIZE); @@ -876,7 +876,7 @@ static bool xgifb_read_vbios(struct pci_dev *pdev) int entry; vbios = xgifb_copy_rom(pdev, &vbios_size); - if (vbios == NULL) { + if (!vbios) { dev_err(&pdev->dev, "Video BIOS not available\n"); return false; } @@ -1186,7 +1186,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev) pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress; - if (pVBInfo->FBAddr == NULL) { + if (!pVBInfo->FBAddr) { dev_dbg(&pdev->dev, "pVBInfo->FBAddr == 0\n"); return 0; } |