From patchwork Wed Jul 22 18:26:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Streetman X-Patchwork-Id: 6846001 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4C8609F358 for ; Wed, 22 Jul 2015 18:28:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D7E520692 for ; Wed, 22 Jul 2015 18:28:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A66AC20689 for ; Wed, 22 Jul 2015 18:28:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752481AbbGVS1S (ORCPT ); Wed, 22 Jul 2015 14:27:18 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34517 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbbGVS1Q (ORCPT ); Wed, 22 Jul 2015 14:27:16 -0400 Received: by pacan13 with SMTP id an13so143921465pac.1; Wed, 22 Jul 2015 11:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=wcVj3yW20ZtyYQW4DTQmNXdgppRNm4engtxDtZhjrqg=; b=c/wrGjO/6pfw+kc8tVshloAbtVWlqmnDhKTj1HdOOHV5pltG33OCOjpZYNJh3JVk0j giUwnb01YOEzY2kmYydpkwt67VT0yO2BsiqLyZOx3DnGCC9pmAwHbsqLrSqyxn9sLx3L yOPx/QpgnORfBes4FjFVTHRfj4TeUbiqVQDqBzQsmGgYh/voi3TmL6GOs7WD+WgBuB2b WhX+cZ8P6yExmwBFluvVUowC93QWU/I9LwKBHpjY/hZ7nAJlK7o/423Gk1bG5kG+xF5I n2I1210SdqdljHLPcozGJ0U6nFf9PT2hcTk744bbYKlx1pVlVVB9JO2w8bHldjsqm813 Kv7A== X-Received: by 10.70.38.136 with SMTP id g8mr8467185pdk.156.1437589635250; Wed, 22 Jul 2015 11:27:15 -0700 (PDT) Received: from toughbook.com (user-0c8ho8q.cable.mindspring.com. [24.136.225.26]) by smtp.gmail.com with ESMTPSA id k9sm4557398pdp.60.2015.07.22.11.27.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 11:27:14 -0700 (PDT) From: Dan Streetman To: Herbert Xu , "David S. Miller" Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Dan Streetman Subject: [PATCH 4/8] crypto: nx - don't register pSeries driver if ENODEV Date: Wed, 22 Jul 2015 14:26:34 -0400 Message-Id: <1437589598-23917-5-git-send-email-ddstreet@ieee.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1437589598-23917-1-git-send-email-ddstreet@ieee.org> References: <1437589598-23917-1-git-send-email-ddstreet@ieee.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 Don't register the pSeries driver when parsing the device tree returns ENODEV. The nx842_probe() function in the pSeries driver returns error instead of registering as a crypto compression driver, when it receives an error return value from the nx842_OF_upd() function that probes the device tree nodes, except when ENODEV is returned. However ENODEV should not be a special case and the driver should not register when there is no hw device, or the hw device is disabled. Signed-off-by: Dan Streetman --- drivers/crypto/nx/nx-842-pseries.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/crypto/nx/nx-842-pseries.c b/drivers/crypto/nx/nx-842-pseries.c index 74c53a1..4b7bd8f 100644 --- a/drivers/crypto/nx/nx-842-pseries.c +++ b/drivers/crypto/nx/nx-842-pseries.c @@ -999,11 +999,8 @@ static int nx842_probe(struct vio_dev *viodev, of_reconfig_notifier_register(&nx842_of_nb); ret = nx842_OF_upd(NULL); - if (ret && ret != -ENODEV) { - dev_err(&viodev->dev, "could not parse device tree. %d\n", ret); - ret = -1; + if (ret) goto error; - } rcu_read_lock(); dev_set_drvdata(&viodev->dev, rcu_dereference(devdata));