projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'topic/hda-unbind' into for-next
[firefly-linux-kernel-4.4.55.git]
/
sound
/
core
/
device.c
diff --git
a/sound/core/device.c
b/sound/core/device.c
index 446dc452654e51a2bbf416dfb103f8013849e0cf..8918838b1999478e2d03b28dd6425005312bba02 100644
(file)
--- a/
sound/core/device.c
+++ b/
sound/core/device.c
@@
-50,10
+50,8
@@
int snd_device_new(struct snd_card *card, enum snd_device_type type,
if (snd_BUG_ON(!card || !device_data || !ops))
return -ENXIO;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (snd_BUG_ON(!card || !device_data || !ops))
return -ENXIO;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
- if (dev == NULL) {
- dev_err(card->dev, "Cannot allocate device, type=%d\n", type);
+ if (!dev)
return -ENOMEM;
return -ENOMEM;
- }
INIT_LIST_HEAD(&dev->list);
dev->card = card;
dev->type = type;
INIT_LIST_HEAD(&dev->list);
dev->card = card;
dev->type = type;