@@ -410,7 +410,7 @@ void rcar_du_crtc_finish_page_flip(struct rcar_du_crtc *rcrtc)
rcrtc->event = NULL;
spin_unlock_irqrestore(&dev->event_lock, flags);
- if (event == NULL)
+ if (!event)
return;
spin_lock_irqsave(&dev->event_lock, flags);
@@ -318,7 +318,7 @@ static int rcar_du_probe(struct platform_device *pdev)
/* Allocate and initialize the R-Car device structure. */
rcdu = devm_kzalloc(&pdev->dev, sizeof(*rcdu), GFP_KERNEL);
- if (rcdu == NULL)
+ if (!rcdu)
return -ENOMEM;
rcdu->dev = &pdev->dev;
@@ -166,7 +166,7 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
int ret;
renc = devm_kzalloc(rcdu->dev, sizeof(*renc), GFP_KERNEL);
- if (renc == NULL)
+ if (!renc)
return -ENOMEM;
renc->output = output;
@@ -181,7 +181,7 @@ rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
unsigned int i;
format = rcar_du_format_info(mode_cmd->pixel_format);
- if (format == NULL) {
+ if (!format) {
dev_dbg(dev->dev, "unsupported pixel format %08x\n",
mode_cmd->pixel_format);
return ERR_PTR(-EINVAL);
@@ -419,7 +419,7 @@ static int rcar_du_properties_init(struct rcar_du_device *rcdu)
{
rcdu->props.alpha =
drm_property_create_range(rcdu->ddev, 0, "alpha", 0, 255);
- if (rcdu->props.alpha == NULL)
+ if (!rcdu->props.alpha)
return -ENOMEM;
/*
@@ -430,7 +430,7 @@ static int rcar_du_properties_init(struct rcar_du_device *rcdu)
rcdu->props.colorkey =
drm_property_create_range(rcdu->ddev, 0, "colorkey",
0, 0x01ffffff);
- if (rcdu->props.colorkey == NULL)
+ if (!rcdu->props.colorkey)
return -ENOMEM;
return 0;
@@ -63,7 +63,7 @@ int rcar_du_lvds_connector_init(struct rcar_du_device *rcdu,
int ret;
rcon = devm_kzalloc(rcdu->dev, sizeof(*rcon), GFP_KERNEL);
- if (rcon == NULL)
+ if (!rcon)
return -ENOMEM;
connector = &rcon->connector;
@@ -253,7 +253,7 @@ int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu)
for (i = 0; i < rcdu->info->num_lvds; ++i) {
lvds = devm_kzalloc(&pdev->dev, sizeof(*lvds), GFP_KERNEL);
- if (lvds == NULL)
+ if (!lvds)
return -ENOMEM;
lvds->dev = rcdu;
@@ -584,7 +584,7 @@ static int rcar_du_plane_atomic_check(struct drm_plane *plane,
}
rstate->format = rcar_du_format_info(state->fb->format->format);
- if (rstate->format == NULL) {
+ if (!rstate->format) {
dev_dbg(rcdu->dev, "%s: unsupported format %08x\n", __func__,
state->fb->format->format);
return -EINVAL;
@@ -637,7 +637,7 @@ rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane)
state = to_rcar_plane_state(plane->state);
copy = kmemdup(state, sizeof(*state), GFP_KERNEL);
- if (copy == NULL)
+ if (!copy)
return NULL;
__drm_atomic_helper_plane_duplicate_state(plane, ©->state);
@@ -662,7 +662,7 @@ static void rcar_du_plane_reset(struct drm_plane *plane)
}
state = kzalloc(sizeof(*state), GFP_KERNEL);
- if (state == NULL)
+ if (!state)
return;
state->hwindex = -1;
@@ -283,7 +283,7 @@ static int rcar_du_vsp_plane_atomic_check(struct drm_plane *plane,
}
rstate->format = rcar_du_format_info(state->fb->format->format);
- if (rstate->format == NULL) {
+ if (!rstate->format) {
dev_dbg(rcdu->dev, "%s: unsupported format %08x\n", __func__,
state->fb->format->format);
return -EINVAL;
@@ -323,7 +323,7 @@ rcar_du_vsp_plane_atomic_duplicate_state(struct drm_plane *plane)
state = to_rcar_vsp_plane_state(plane->state);
copy = kmemdup(state, sizeof(*state), GFP_KERNEL);
- if (copy == NULL)
+ if (!copy)
return NULL;
__drm_atomic_helper_plane_duplicate_state(plane, ©->state);
@@ -348,7 +348,7 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane)
}
state = kzalloc(sizeof(*state), GFP_KERNEL);
- if (state == NULL)
+ if (!state)
return;
state->alpha = 255;