@@ -305,9 +305,9 @@ static void __iomem *offb_map_reg(struct device_node *np, int index,
unsigned int flags;
addrp = of_get_pci_address(np, index, &asize, &flags);
- if (addrp == NULL)
+ if (!addrp)
addrp = of_get_address(np, index, &asize, &flags);
- if (addrp == NULL)
+ if (!addrp)
return NULL;
if ((flags & (IORESOURCE_IO | IORESOURCE_MEM)) == 0)
return NULL;
@@ -412,7 +412,7 @@ static void __init offb_init_fb(const char *name,
info = framebuffer_alloc(sizeof(u32) * 16, NULL);
- if (info == NULL) {
+ if (!info) {
release_mem_region(res_start, res_size);
return;
}
@@ -555,25 +555,25 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
#endif
pp = of_get_property(dp, "linux,bootx-depth", &len);
- if (pp == NULL)
+ if (!pp)
pp = of_get_property(dp, "depth", &len);
if (pp && len == sizeof(u32))
depth = be32_to_cpup(pp);
pp = of_get_property(dp, "linux,bootx-width", &len);
- if (pp == NULL)
+ if (!pp)
pp = of_get_property(dp, "width", &len);
if (pp && len == sizeof(u32))
width = be32_to_cpup(pp);
pp = of_get_property(dp, "linux,bootx-height", &len);
- if (pp == NULL)
+ if (!pp)
pp = of_get_property(dp, "height", &len);
if (pp && len == sizeof(u32))
height = be32_to_cpup(pp);
pp = of_get_property(dp, "linux,bootx-linebytes", &len);
- if (pp == NULL)
+ if (!pp)
pp = of_get_property(dp, "linebytes", &len);
if (pp && len == sizeof(u32) && (*pp != 0xffffffffu))
pitch = be32_to_cpup(pp);
@@ -593,7 +593,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
* the "address" property. If none match, we pick the biggest
*/
up = of_get_property(dp, "linux,bootx-addr", &len);
- if (up == NULL)
+ if (!up)
up = of_get_property(dp, "address", &len);
if (up && len == sizeof(u32))
addr_prop = *up;