From patchwork Thu May 22 20:21:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4226381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6CC949F23C for ; Thu, 22 May 2014 20:22:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A558920394 for ; Thu, 22 May 2014 20:22:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3783202DD for ; Thu, 22 May 2014 20:22:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnZTg-0007kl-1F; Thu, 22 May 2014 20:20:36 +0000 Received: from mail-ee0-f47.google.com ([74.125.83.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnZTd-0007gY-GT for linux-arm-kernel@lists.infradead.org; Thu, 22 May 2014 20:20:34 +0000 Received: by mail-ee0-f47.google.com with SMTP id c13so2996504eek.20 for ; Thu, 22 May 2014 13:20:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qj9hFFI/peFEuYX9YvYG+D8SP3dJcBICLBXJJmlVuTM=; b=BlpSI7xGy+vVvO5UB9E3VIY3j2pu0JPftXo/bLIePX8hKXj/IG/KvPrxjUWIX8yDAp zvpMdf7DE95VExhLa7ITyiY2YKU7j1vFrCO7OXI9PTuXFTY9LPxfLWQDejv0y9ZxnOqh IM/pyXVW+fF7IIGthT/RFwQ7ZJ4kvH7rTyuKWykZTZ+O44UNTiAMbmhdC7QjRSCMm89e EuiQR32cMNV//xx9owQDauinnV0RvF7MMMJc9GBvpi/8fvGTVvSTTUxxnPO9qAR6yYB+ fzwddGDd/aV636e9C2/irpzy8xyi74m4+5vGPQz8HLSI41v10JVMQJ/T98G2gnMv5zDr +qig== X-Gm-Message-State: ALoCoQmqBS/UEmfXLDeHOn1+P26tvRCBU63mQpJ2sOIx7jfZgv9xgnI2XLNqut0PeuAc2BkmDeBG X-Received: by 10.15.26.135 with SMTP id n7mr974280eeu.71.1400790009392; Thu, 22 May 2014 13:20:09 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id j2sm2846580eey.44.2014.05.22.13.20.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 May 2014 13:20:08 -0700 (PDT) From: Rickard Strandqvist To: Ben Dooks , Kukjin Kim Subject: [PATCH] sound: soc: samsung: dma.c: Fix to remove null pointer checks that could never happen Date: Thu, 22 May 2014 22:21:00 +0200 Message-Id: <1400790060-10977-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140522_132033_710782_353FF026 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Rickard Strandqvist , Sangbeom Kim , linux-kernel@vger.kernel.org, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Mark Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist Reviewed-by: Tushar Behera --- sound/soc/samsung/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index dc09b71..0f17ae0 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -124,8 +124,7 @@ static void audio_buffdone(void *data) if (prtd->dma_pos >= prtd->dma_end) prtd->dma_pos = prtd->dma_start; - if (substream) - snd_pcm_period_elapsed(substream); + snd_pcm_period_elapsed(substream); spin_lock(&prtd->lock); if (!samsung_dma_has_circular()) {