X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fsound%2Fsoc%2Fsunxi%2Fsun4i-codec.c;fp=kernel%2Fsound%2Fsoc%2Fsunxi%2Fsun4i-codec.c;h=1a4999f9d56fa2b0058c7cb5e54a32c4c6e9e57d;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hp=1bb896d78d09817eff6fc38af7e2d1d1b3622ef3;hpb=c189ccac5702322ed843fe17057035b7222a59b6;p=kvmfornfv.git diff --git a/kernel/sound/soc/sunxi/sun4i-codec.c b/kernel/sound/soc/sunxi/sun4i-codec.c index 1bb896d78..1a4999f9d 100644 --- a/kernel/sound/soc/sunxi/sun4i-codec.c +++ b/kernel/sound/soc/sunxi/sun4i-codec.c @@ -575,11 +575,11 @@ static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) - return NULL; + return ERR_PTR(-ENOMEM); card->dai_link = sun4i_codec_create_link(dev, &card->num_links); if (!card->dai_link) - return NULL; + return ERR_PTR(-ENOMEM); card->dev = dev; card->name = "sun4i-codec"; @@ -661,7 +661,8 @@ static int sun4i_codec_probe(struct platform_device *pdev) } card = sun4i_codec_create_card(&pdev->dev); - if (!card) { + if (IS_ERR(card)) { + ret = PTR_ERR(card); dev_err(&pdev->dev, "Failed to create our card\n"); goto err_unregister_codec; }