linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jack Xu <jack.xu@intel.com>,
	Zhehui Xiang <zhehui.xiang@intel.com>,
	Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Sasha Levin <sashal@kernel.org>,
	qat-linux@intel.com, linux-crypto@vger.kernel.org,
	clang-built-linux@googlegroups.com
Subject: [PATCH AUTOSEL 5.13 31/85] crypto: qat - check return code of qat_hal_rd_rel_reg()
Date: Sun,  4 Jul 2021 19:03:26 -0400	[thread overview]
Message-ID: <20210704230420.1488358-31-sashal@kernel.org> (raw)
In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org>

From: Jack Xu <jack.xu@intel.com>

[ Upstream commit 96b57229209490c8bca4335b01a426a96173dc56 ]

Check the return code of the function qat_hal_rd_rel_reg() and return it
to the caller.

This is to fix the following warning when compiling the driver with
clang scan-build:

    drivers/crypto/qat/qat_common/qat_hal.c:1436:2: warning: 6th function call argument is an uninitialized value

Signed-off-by: Jack Xu <jack.xu@intel.com>
Co-developed-by: Zhehui Xiang <zhehui.xiang@intel.com>
Signed-off-by: Zhehui Xiang <zhehui.xiang@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/crypto/qat/qat_common/qat_hal.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c
index bd3028126cbe..069f51621f0e 100644
--- a/drivers/crypto/qat/qat_common/qat_hal.c
+++ b/drivers/crypto/qat/qat_common/qat_hal.c
@@ -1417,7 +1417,11 @@ static int qat_hal_put_rel_wr_xfer(struct icp_qat_fw_loader_handle *handle,
 		pr_err("QAT: bad xfrAddr=0x%x\n", xfr_addr);
 		return -EINVAL;
 	}
-	qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, gprnum, &gprval);
+	status = qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, gprnum, &gprval);
+	if (status) {
+		pr_err("QAT: failed to read register");
+		return status;
+	}
 	gpr_addr = qat_hal_get_reg_addr(ICP_GPB_REL, gprnum);
 	data16low = 0xffff & data;
 	data16hi = 0xffff & (data >> 0x10);
-- 
2.30.2


  parent reply	other threads:[~2021-07-04 23:05 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 23:02 [PATCH AUTOSEL 5.13 01/85] spi: Make of_register_spi_device also set the fwnode Sasha Levin
2021-07-04 23:02 ` [PATCH AUTOSEL 5.13 02/85] Add a reference to ucounts for each cred Sasha Levin
2021-07-04 23:02 ` [PATCH AUTOSEL 5.13 03/85] staging: media: rkvdec: fix pm_runtime_get_sync() usage count Sasha Levin
2021-07-04 23:02 ` [PATCH AUTOSEL 5.13 04/85] media: i2c: imx334: fix the pm runtime get logic Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 05/85] media: marvel-ccic: fix some issues when getting pm_runtime Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 06/85] media: mdk-mdp: fix pm_runtime_get_sync() usage count Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 07/85] media: s5p: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 08/85] media: am437x: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 09/85] media: sh_vou: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 10/85] media: mtk-vcodec: fix PM runtime get logic Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 11/85] media: s5p-jpeg: fix pm_runtime_get_sync() usage count Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 12/85] media: sunxi: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 13/85] media: sti/bdisp: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 14/85] media: exynos4-is: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 15/85] media: exynos-gsc: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 16/85] spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 17/85] spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages() Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 18/85] spi: omap-100k: Fix the length judgment problem Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 19/85] regulator: uniphier: Add missing MODULE_DEVICE_TABLE Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 20/85] sched/core: Initialize the idle task with preemption disabled Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 21/85] hwrng: exynos - Fix runtime PM imbalance on error Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 22/85] crypto: nx - add missing MODULE_DEVICE_TABLE Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 23/85] regmap-i2c: Set regmap max raw r/w from quirks Sasha Levin
2021-07-05 12:09   ` Mark Brown
2021-07-09 14:02     ` Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 24/85] media: sti: fix obj-$(config) targets Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 25/85] sched: Make the idle task quack like a per-CPU kthread Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 26/85] media: cpia2: fix memory leak in cpia2_usb_probe Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 27/85] media: cobalt: fix race condition in setting HPD Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 28/85] media: hevc: Fix dependent slice segment flags Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 29/85] media: pvrusb2: fix warning in pvr2_i2c_core_done Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 30/85] media: imx: imx7_mipi_csis: Fix logging of only error event counters Sasha Levin
2021-07-04 23:03 ` Sasha Levin [this message]
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 32/85] crypto: qat - remove unused macro in FW loader Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 33/85] crypto: qce: skcipher: Fix incorrect sg count for dma transfers Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 34/85] crypto: ecdh - fix ecdh-nist-p192's entry in testmgr Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 35/85] crypto: ecdh - fix 'ecdh_init' Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 36/85] arm64: perf: Convert snprintf to sysfs_emit Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 37/85] sched/fair: Fix ascii art by relpacing tabs Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 38/85] ima: Don't remove security.ima if file must not be appraised Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 39/85] media: i2c: ov2659: Use clk_{prepare_enable,disable_unprepare}() to set xvclk on/off Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 40/85] media: bt878: do not schedule tasklet when it is not setup Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 41/85] media: em28xx: Fix possible memory leak of em28xx struct Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 42/85] media: hantro: Fix .buf_prepare Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 43/85] media: cedrus: " Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 44/85] media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 45/85] media: bt8xx: Fix a missing check bug in bt878_probe Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 46/85] media: st-hva: Fix potential NULL pointer dereferences Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 47/85] crypto: hisilicon/sec - fixup 3des minimum key size declaration Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 48/85] arm64: entry: don't instrument entry code with KCOV Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 49/85] Makefile: fix GDB warning with CONFIG_RELR Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 50/85] media: dvd_usb: memory leak in cinergyt2_fe_attach Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 51/85] memstick: rtsx_usb_ms: fix UAF Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 52/85] mmc: sdhci-sprd: use sdhci_sprd_writew Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 53/85] mmc: via-sdmmc: add a check against NULL pointer dereference Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 54/85] mmc: sdhci-of-aspeed: Turn down a phase correction warning Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 55/85] spi: meson-spicc: fix a wrong goto jump for avoiding memory leak Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 56/85] spi: meson-spicc: fix memory leak in meson_spicc_probe Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 57/85] regulator: mt6315: Fix checking return value of devm_regmap_init_spmi_ext Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 58/85] crypto: shash - avoid comparing pointers to exported functions under CFI Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 59/85] media: dvb_net: avoid speculation from net slot Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 60/85] media: dvbdev: fix error logic at dvb_register_device() Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 61/85] media: siano: fix device register error path Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 62/85] media: imx-csi: Skip first few frames from a BT.656 source Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 63/85] hwmon: (max31790) Report correct current pwm duty cycles Sasha Levin
2021-07-04 23:03 ` [PATCH AUTOSEL 5.13 64/85] hwmon: (max31790) Fix pwmX_enable attributes Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 65/85] sched/fair: Take thermal pressure into account while estimating energy Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 66/85] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 67/85] drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 68/85] KVM: arm64: Restore PMU configuration on first run Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 69/85] KVM: PPC: Book3S HV: Fix TLB management on SMT8 POWER9 and POWER10 processors Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 70/85] btrfs: fix error handling in __btrfs_update_delayed_inode Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 71/85] btrfs: abort transaction if we fail to update the delayed inode Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 72/85] btrfs: always abort the transaction if we abort a trans handle Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 73/85] btrfs: sysfs: fix format string for some discard stats Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 74/85] btrfs: scrub: fix subpage repair error caused by hard coded PAGE_SIZE Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 75/85] btrfs: make Private2 lifespan more consistent Sasha Levin
2021-07-07 11:10   ` David Sterba
2021-07-08 11:09     ` Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 76/85] btrfs: fix the filemap_range_has_page() call in btrfs_punch_hole_lock_range() Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 77/85] btrfs: don't clear page extent mapped if we're not invalidating the full page Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 78/85] btrfs: disable build on platforms having page size 256K Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 79/85] locking/lockdep: Fix the dep path printing for backwards BFS Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 80/85] lockding/lockdep: Avoid to find wrong lock dep path in check_irq_usage() Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 81/85] KVM: s390: get rid of register asm usage Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 82/85] regulator: mt6358: Fix vdram2 .vsel_mask Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 83/85] regulator: da9052: Ensure enough delay time for .set_voltage_time_sel Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 84/85] media: Fix Media Controller API config checks Sasha Levin
2021-07-04 23:04 ` [PATCH AUTOSEL 5.13 85/85] seccomp: Support atomic "addfd + send reply" Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210704230420.1488358-31-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jack.xu@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qat-linux@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=zhehui.xiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).