Message ID | 20250417084836.937452-1-nichen@iscas.ac.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | soc: ti: knav_qmss_queue: Remove unnecessary NULL check before free_percpu() | expand |
Hi Chen Ni, On Thu, 17 Apr 2025 16:48:36 +0800, Chen Ni wrote: > free_percpu() checks for NULL pointers internally. > Remove unneeded NULL check here. > > I have applied the following to branch ti-drivers-soc-next on [1]. Thank you! [1/1] soc: ti: knav_qmss_queue: Remove unnecessary NULL check before free_percpu() commit: 17bff220c6d69e4be38c9899a7515c3b02de60f0 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. [1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index ea52425864a9..6e56e7609ccd 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -252,8 +252,7 @@ static struct knav_queue *__knav_queue_open(struct knav_queue_inst *inst, return qh; err: - if (qh->stats) - free_percpu(qh->stats); + free_percpu(qh->stats); devm_kfree(inst->kdev->dev, qh); return ERR_PTR(ret); }
free_percpu() checks for NULL pointers internally. Remove unneeded NULL check here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> --- drivers/soc/ti/knav_qmss_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)