From patchwork Fri Jan 27 20:39:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 138287 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6F2E6B6EE8 for ; Sat, 28 Jan 2012 07:40:27 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RqsZ8-0003KA-95; Fri, 27 Jan 2012 20:38:34 +0000 Received: from mail-pz0-f49.google.com ([209.85.210.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RqsZ6-0003JX-BV for linux-mtd@lists.infradead.org; Fri, 27 Jan 2012 20:38:32 +0000 Received: by dadz9 with SMTP id z9so896373dad.36 for ; Fri, 27 Jan 2012 12:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=eAWR+vOrNvdOcXrs7aHR9k96BN8tMhaRDiqjVPy3su8=; b=LshWhEvDsioXP0cbQxu2N6FYzTEd6zIR0sn5lIYbTyiHAKo3PlKqWeeKoZZr5XEViy HmVPFxpqWSja3JOqqAbq7/Bw6OaDii+yuZ5SHsS+QcHHlh3xnkFcOCqV7SRgCob5vVM9 jvRIHjfKm8Z3SYvFF2bxru82g0SZ9dO9NWfUM= Received: by 10.68.73.4 with SMTP id h4mr17319062pbv.27.1327696710415; Fri, 27 Jan 2012 12:38:30 -0800 (PST) Received: from localhost.localdomain (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPS id i4sm22622522pbl.2.2012.01.27.12.38.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jan 2012 12:38:29 -0800 (PST) From: Brian Norris To: Subject: [PATCH] mtd: mtdcore: remove unnecessary mtd->resume check Date: Fri, 27 Jan 2012 12:39:32 -0800 Message-Id: <1327696772-18081-1-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 1.7.5.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (computersforpeace[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Brian Norris , David Woodhouse , Artem Bityutskiy X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We don't need to to check for mtd->resume before calling mtd_resume(). mtd_resume() should take care of that. Signed-off-by: Brian Norris --- drivers/mtd/mtdcore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index de96865..f96c2cd 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -126,7 +126,7 @@ static int mtd_cls_resume(struct device *dev) { struct mtd_info *mtd = dev_get_drvdata(dev); - if (mtd && mtd->resume) + if (mtd) mtd_resume(mtd); return 0; }