diff options
Diffstat (limited to 'sound/core/device.c')
-rw-r--r-- | sound/core/device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/device.c b/sound/core/device.c index 446dc452654e..8918838b1999 100644 --- 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 (dev == NULL) { - dev_err(card->dev, "Cannot allocate device, type=%d\n", type); + if (!dev) return -ENOMEM; - } INIT_LIST_HEAD(&dev->list); dev->card = card; dev->type = type; |