Merge branch 'topic/hda-unbind' into for-next
[firefly-linux-kernel-4.4.55.git] / sound / core / device.c
index 446dc452654e51a2bbf416dfb103f8013849e0cf..8918838b1999478e2d03b28dd6425005312bba02 100644 (file)
@@ -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;