From patchwork Sat Feb 25 10:29:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Burduselu X-Patchwork-Id: 9591999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EF6560581 for ; Sat, 25 Feb 2017 21:25:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F7E32848E for ; Sat, 25 Feb 2017 21:25:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1419F284AD; Sat, 25 Feb 2017 21:25:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F34228500 for ; Sat, 25 Feb 2017 21:25:46 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 17100266B38; Sat, 25 Feb 2017 22:13:34 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 87D3F26683E; Sat, 25 Feb 2017 11:29:47 +0100 (CET) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by alsa0.perex.cz (Postfix) with ESMTP id B279A26680F for ; Sat, 25 Feb 2017 11:29:43 +0100 (CET) Received: by mail-wr0-f195.google.com with SMTP id g10so4583105wrg.0 for ; Sat, 25 Feb 2017 02:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EOVejz7YQ7fQDizP1Lh85QPb1CW7etLq901LMG2WTJo=; b=gChLyJfSH//U44L2h/jsTOgk4wBn0Lj6Cp9Gzmiw/1+UzWPkuSdm072dyV00TiL3pA I3M7cXHwZFSN5/xtdKrdeb6XARVz4bc5BGXtYoR52eDIPPZsBC/frudU5xIKE639rJRj D5f0AV9hXsry/AyAryT1QaKX6OKTv284MSVWNwNsvw6M7PTfGBffCwQ7CzAsypiTFLcS hnu3Q5Pc6g4WC2e/fWxopTW0JWBuKeKw+0M9QMUpGlUPE3siGX7rvcjFTjRVE9VDnwBF 6peWl5RBUMdXHzcwHWcFvBj6nrbER+UJxhpEXLyFwJ84fm35RsLGKOXa/Tq0WL0iYGHj bNJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EOVejz7YQ7fQDizP1Lh85QPb1CW7etLq901LMG2WTJo=; b=R02AqxCMisnbr5Q2Yl0laEsys1AEAhesn+yIJa0CBvFb21sHZWlEZ1jX7yBSjt0j7F dv1OA824VJgYUEfFLA4b2tMSIjETKSGyF/LCOLeSSdlhg6QRcNHaEZ3V3l85ZhWvion0 BvMSPlJ8R6BcEBVpTEY9jmV6BaRueltLVzUdbOoQzGtI0OWe79FeQlo7hx/mb7r9d5MA QVYGv56Oq4UCOEukc36UWYCELt11T8HzrrP38G5Hmzxf3viVzzUZAUyrJPDg6dB6yb1N ODm3FohMN80yqJRU819aju29UtCrM49MH0ayRob8somI96cKbNeNBQtNzPvux3q42MAw xMaA== X-Gm-Message-State: AMke39k3Jf/fkPnPyuQiPByTWmiEvAODsPFmQY+xVKMiRGa06pnicbt6RTnGMg+kA4k7ww== X-Received: by 10.223.152.241 with SMTP id w104mr7155591wrb.151.1488018582918; Sat, 25 Feb 2017 02:29:42 -0800 (PST) Received: from localhost.localdomain ([141.85.225.206]) by smtp.gmail.com with ESMTPSA id i15sm5807083wmf.21.2017.02.25.02.29.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Feb 2017 02:29:41 -0800 (PST) From: Mihai Burduselu To: perex@perex.cz, tiwai@suse.com, michelcatalin@gmail.com Date: Sat, 25 Feb 2017 12:29:33 +0200 Message-Id: <20170225102933.6879-1-michelcatalin@gmail.com> X-Mailer: git-send-email 2.11.0 X-Mailman-Approved-At: Sat, 25 Feb 2017 22:13:26 +0100 Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, broonie@kernel.org, lgirdwood@gmail.com, adi-buildroot-devel@lists.sourceforge.net Subject: [alsa-devel] [PATCH] soc: blackfin: remove 'out of memory' message X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP reported by checkpatch.pl Signed-off-by: Mihai Burduselu --- sound/soc/blackfin/bf5xx-sport.c | 8 ++------ sound/soc/blackfin/bf6xx-sport.c | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sound/soc/blackfin/bf5xx-sport.c b/sound/soc/blackfin/bf5xx-sport.c index 9dfa1241ea66..c445d6cc875e 100644 --- a/sound/soc/blackfin/bf5xx-sport.c +++ b/sound/soc/blackfin/bf5xx-sport.c @@ -876,10 +876,8 @@ struct sport_device *sport_init(struct platform_device *pdev, } sport = kzalloc(sizeof(*sport), GFP_KERNEL); - if (!sport) { - dev_err(dev, "failed to allocate for sport device\n"); + if (!sport) goto __init_err0; - } sport->num = param.num; sport->dma_rx_chan = param.dma_rx_chan; @@ -921,10 +919,8 @@ struct sport_device *sport_init(struct platform_device *pdev, sport->dummy_count = param.dummy_count; sport->private_data = kzalloc(priv_size, GFP_KERNEL); - if (!sport->private_data) { - dev_err(dev, "could not alloc priv data %zu bytes\n", priv_size); + if (!sport->private_data) goto __init_err4; - } if (L1_DATA_A_LENGTH) sport->dummy_buf = l1_data_sram_zalloc(param.dummy_count * 2); diff --git a/sound/soc/blackfin/bf6xx-sport.c b/sound/soc/blackfin/bf6xx-sport.c index dfb744381c42..b56ff75d4c13 100644 --- a/sound/soc/blackfin/bf6xx-sport.c +++ b/sound/soc/blackfin/bf6xx-sport.c @@ -388,10 +388,8 @@ struct sport_device *sport_create(struct platform_device *pdev) int ret; sport = kzalloc(sizeof(*sport), GFP_KERNEL); - if (!sport) { - dev_err(dev, "Unable to allocate memory for sport device\n"); + if (!sport) return NULL; - } sport->pdev = pdev; ret = sport_get_resource(sport);