From patchwork Fri Sep 14 09:20:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11412 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4A18E23E41 for ; Fri, 14 Sep 2012 09:23:31 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id BAA76A33039 for ; Fri, 14 Sep 2012 09:23:30 +0000 (UTC) Received: by iafj25 with SMTP id j25so2816685iaf.11 for ; Fri, 14 Sep 2012 02:23:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=p/4l4vqnQ+6oHBMYFQzCUmFh7SVBWxqy/H+ek/uZZS8=; b=CZVpYds5X/uPLWgqB+IE8FObuzqheDVwgztWvgdYv2xHXQQeKDXYFlrQNoCRMDwGN0 7qJVPsJjp1O3ztYnqeTxVDn6yk1h5HqaPxTTXj5RIyN0hkfW9gGngZ4li59Z3hxKTJZR Zl8pAifYZYfSIp2gNa5qhOLl2LZ8URjbaw8BzRvkBGz6d+8s1LFosmKPQXaYMD/2SAx3 RN0wL6xwQBiE05aWVg+MYaGsAzJGXbSg8ugMX3m31T7mDLd8pluQDaqW+JltYzkR3mOC NScTInzJ6kG6/i1bY8rx+bWroqsRpv9j01CzCuNL0VGofngtU0N7GRXmKWYNzJLIsBhR iyUA== Received: by 10.50.7.212 with SMTP id l20mr2289453iga.43.1347614610164; Fri, 14 Sep 2012 02:23:30 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp179075igc; Fri, 14 Sep 2012 02:23:29 -0700 (PDT) Received: by 10.66.81.202 with SMTP id c10mr3601338pay.31.1347614609525; Fri, 14 Sep 2012 02:23:29 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id qs7si1986987pbc.102.2012.09.14.02.23.29 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 02:23:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by pbcmd12 with SMTP id md12so6140059pbc.37 for ; Fri, 14 Sep 2012 02:23:29 -0700 (PDT) Received: by 10.68.223.164 with SMTP id qv4mr4538167pbc.20.1347614609109; Fri, 14 Sep 2012 02:23:29 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ou6sm703517pbc.9.2012.09.14.02.23.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 02:23:28 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, s.nawrocki@samsung.com, k.debski@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] [media] s5p-mfc: Remove unreachable code Date: Fri, 14 Sep 2012 14:50:17 +0530 Message-Id: <1347614417-19343-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQn7rKV5Ze22Pb/oUHvyBJgM87NgdG6VJjDPjMXqwQpoFp2lsSaKtteGRB0lTqYfquYUMTN6 Code after return statement never gets executed. Hence can be deleted. Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 21 +-------------------- 1 files changed, 1 insertions(+), 20 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index e3e616d..56876be 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1144,30 +1144,11 @@ static int s5p_mfc_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct s5p_mfc_dev *m_dev = platform_get_drvdata(pdev); - int ret; if (m_dev->num_inst == 0) return 0; - return s5p_mfc_sleep(m_dev); - if (test_and_set_bit(0, &m_dev->enter_suspend) != 0) { - mfc_err("Error: going to suspend for a second time\n"); - return -EIO; - } - /* Check if we're processing then wait if it necessary. */ - while (test_and_set_bit(0, &m_dev->hw_lock) != 0) { - /* Try and lock the HW */ - /* Wait on the interrupt waitqueue */ - ret = wait_event_interruptible_timeout(m_dev->queue, - m_dev->int_cond || m_dev->ctx[m_dev->curr_ctx]->int_cond, - msecs_to_jiffies(MFC_INT_TIMEOUT)); - - if (ret == 0) { - mfc_err("Waiting for hardware to finish timed out\n"); - return -EIO; - } - } - return 0; + return s5p_mfc_sleep(m_dev); } static int s5p_mfc_resume(struct device *dev)