From patchwork Fri Aug 14 03:05:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7011891 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A2457C05AC for ; Fri, 14 Aug 2015 03:06:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FF5C205EC for ; Fri, 14 Aug 2015 03:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2CFF204D8 for ; Fri, 14 Aug 2015 03:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752706AbbHNDGV (ORCPT ); Thu, 13 Aug 2015 23:06:21 -0400 Received: from mail-yk0-f180.google.com ([209.85.160.180]:35074 "EHLO mail-yk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751993AbbHNDGU (ORCPT ); Thu, 13 Aug 2015 23:06:20 -0400 Received: by ykek5 with SMTP id k5so6674515yke.2 for ; Thu, 13 Aug 2015 20:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=fZMmbjDvo2Xa7EhTd0/oV0S2sPivYut25IZxcxjE3r8=; b=YhuIZMuJn+t0VmVOptLbtcgX7emerBpfuVimgObf3LM/RCLbuw4+xx0R5PBtcR6D5d HI0utq/44Jze/3ecXrIrmqZ9xgILhI/V1CbJ/Cx4X/lMiOzEWD9gHxu1F1qIE1t21cmp btBN1+U4gaxdIJqp4LgLbdT4zFMluE+TZAR/Z1h7JxGohs38Y3yCryFkFFdTJJylxKI2 PU4k7qYPtiXr2nQqnCX18SM5FOqTTNr/TrQhcasmHO810PyxOGWhhulj4Bix7H2K7JFD 30jK/e50AmYWyWJ61+F1qZQ6cc0vgoWcodmCgkXgmmZGp1tE/pnS1MsnNkTbn/6kR0YG nhUA== X-Received: by 10.170.194.86 with SMTP id l83mr29451523yke.2.1439521580158; Thu, 13 Aug 2015 20:06:20 -0700 (PDT) Received: from localhost.localdomain ([187.64.233.140]) by smtp.gmail.com with ESMTPSA id z193sm4033410ywd.24.2015.08.13.20.06.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Aug 2015 20:06:19 -0700 (PDT) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH] crypto: amcc: Do a NULL check for pointer Date: Fri, 14 Aug 2015 00:05:58 -0300 Message-Id: <1439521558-17214-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Fabio Estevam Compare pointer-typed values to NULL rather than 0. The semantic patch that makes this change is available in scripts/coccinelle/null/badzero.cocci Signed-off-by: Fabio Estevam --- drivers/crypto/amcc/crypto4xx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 3b28e8c..47c4b08 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1113,7 +1113,7 @@ static irqreturn_t crypto4xx_ce_interrupt_handler(int irq, void *data) struct device *dev = (struct device *)data; struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); - if (core_dev->dev->ce_base == 0) + if (core_dev->dev->ce_base == NULL) return 0; writel(PPC4XX_INTERRUPT_CLR,