From patchwork Wed Apr 5 09:04:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 670756 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 200F1C76188 for ; Wed, 5 Apr 2023 09:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237621AbjDEJEf (ORCPT ); Wed, 5 Apr 2023 05:04:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237616AbjDEJEb (ORCPT ); Wed, 5 Apr 2023 05:04:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEC74171A for ; Wed, 5 Apr 2023 02:04:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 729846254E for ; Wed, 5 Apr 2023 09:04:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 118FDC4339C; Wed, 5 Apr 2023 09:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680685468; bh=dXbpBAkd76lyuS9ClysGa5XOzVAb4r9ONCYrH5D+Juc=; h=From:To:Cc:Subject:Date:From; b=UOR8+hhoML7+N4bu+AC9mx9nSD2a5ppMkZSBuEjV3ivgysVQynBdAeh33FMdmlwCh ZiNxjwNom7W0mHmKRJ+EAlRcvQAJGz+qj3ZzaEnLFSL1mIcveArluS0G+qRum4GUrm 7BSecbQe0oqFD2NugI+nSLcLc+HkfBOokMCvoJ4vr2zi+/6G9VafX/ImOr20/38IOg ZAveDuXBNh11AoKMWTS/KWjHFMmSYPmADIMv1Y9wPymPytoNH17/4cN8wSjF11njrg VmYJD0uQnacnFPqgtUBVBcaX9JbZnp/1t3mjSOXcvkawKTwqf77/KbpC4kXGtipACK iZ2MyiqJWsa5w== From: Kalle Valo To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: [PATCH] wifi: ath11k: print a warning when crypto_alloc_shash() fails Date: Wed, 5 Apr 2023 12:04:25 +0300 Message-Id: <20230405090425.1351-1-kvalo@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Kalle Valo Christoph reported that ath11k failed to initialise when michael_mic.ko module was not installed. To make it easier to notice that case print a warning when crypto_alloc_shash() fails. Compile tested only. Reported-by: Christoph Hellwig Link: https://lore.kernel.org/all/20221130133016.GC3055@lst.de/ Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/dp_rx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) base-commit: bea046575a2e6d7d1cf63cc7ab032647a3585de5 diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 99859b59138e..d22e5349c551 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id int i; tfm = crypto_alloc_shash("michael_mic", 0, 0); - if (IS_ERR(tfm)) + if (IS_ERR(tfm)) { + ath11k_warn(ab, "failed to allocate michael_mic shash: %ld\n", + PTR_ERR(tfm)); return PTR_ERR(tfm); + } spin_lock_bh(&ab->base_lock);