@@ -146,7 +146,7 @@ static void pop_dbg(struct device *dev, u32 pop_time, const char *fmt, ...)
return;
buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
- if (buf == NULL)
+ if (!buf)
return;
va_start(args, fmt);
@@ -883,7 +883,7 @@ static int dapm_create_or_share_kcontrol(struct snd_soc_dapm_widget *w,
long_name = kasprintf(GFP_KERNEL, "%s %s",
w->name + prefix_len,
w->kcontrol_news[kci].name);
- if (long_name == NULL)
+ if (!long_name)
return -ENOMEM;
name = long_name;
@@ -1086,7 +1086,7 @@ static int dapm_widget_list_create(struct snd_soc_dapm_widget_list **list,
size++;
*list = kzalloc(sizeof(**list) + size * sizeof(*w), GFP_KERNEL);
- if (*list == NULL)
+ if (!*list)
return -ENOMEM;
list_for_each_entry(w, widgets, work_list)
@@ -2668,7 +2668,7 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
path->is_supply = 1;
/* connect static paths */
- if (control == NULL) {
+ if (!control) {
path->connect = 1;
} else {
switch (wsource->id) {
@@ -2777,12 +2777,12 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
if (!wsource)
wsource = wtsource;
- if (wsource == NULL) {
+ if (!wsource) {
dev_err(dapm->dev, "ASoC: no source widget found for %s\n",
route->source);
return -ENODEV;
}
- if (wsink == NULL) {
+ if (!wsink) {
dev_err(dapm->dev, "ASoC: no sink widget found for %s\n",
route->sink);
return -ENODEV;
@@ -3489,7 +3489,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name);
else
w->name = kstrdup_const(widget->name, GFP_KERNEL);
- if (w->name == NULL) {
+ if (!w->name) {
kfree(w);
return NULL;
}