diff options
| -rw-r--r-- | sound/soc/generic/simple-card.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 6c61b1758f78..11030a63b811 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
| @@ -211,15 +211,17 @@ static int asoc_simple_card_probe(struct platform_device *pdev) | |||
| 211 | dev_err(dev, "parse error %d\n", ret); | 211 | dev_err(dev, "parse error %d\n", ret); |
| 212 | return ret; | 212 | return ret; |
| 213 | } | 213 | } |
| 214 | } else { | ||
| 215 | return -ENOMEM; | ||
| 214 | } | 216 | } |
| 215 | } else { | 217 | } else { |
| 216 | cinfo = pdev->dev.platform_data; | 218 | cinfo = pdev->dev.platform_data; |
| 217 | cinfo->snd_card.dev = &pdev->dev; | 219 | if (!cinfo) { |
| 218 | } | 220 | dev_err(dev, "no info for asoc-simple-card\n"); |
| 221 | return -EINVAL; | ||
| 222 | } | ||
| 219 | 223 | ||
| 220 | if (!cinfo) { | 224 | cinfo->snd_card.dev = &pdev->dev; |
| 221 | dev_err(dev, "no info for asoc-simple-card\n"); | ||
| 222 | return -EINVAL; | ||
| 223 | } | 225 | } |
| 224 | 226 | ||
| 225 | if (!cinfo->name || | 227 | if (!cinfo->name || |
