]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drivers/hwtracing/coresight: remove unneeded variable in tmc_crashdata_release()
authorElsanti <santiagojoseleal27@gmail.com>
Sat, 28 Feb 2026 22:23:44 +0000 (18:23 -0400)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 2 Mar 2026 09:14:49 +0000 (09:14 +0000)
The variable 'ret' is initialized to 0, never modified, and returned
directly. Remove it and return 0 explicitly.

Signed-off-by: Elsanti <santiagojoseleal27@gmail.com>
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20260228222344.288639-1-santiagojoseleal27@gmail.com
drivers/hwtracing/coresight/coresight-tmc-core.c

index 58b469ee73b490932d78f5a6bc704c2abbe2f737..c89fe996af23194c7e59432ce39ce20bb65937cf 100644 (file)
@@ -397,7 +397,6 @@ static ssize_t tmc_crashdata_read(struct file *file, char __user *data,
 
 static int tmc_crashdata_release(struct inode *inode, struct file *file)
 {
-       int ret = 0;
        unsigned long flags;
        struct tmc_resrv_buf *rbuf;
        struct tmc_drvdata *drvdata = container_of(file->private_data,
@@ -410,7 +409,7 @@ static int tmc_crashdata_release(struct inode *inode, struct file *file)
        raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
        dev_dbg(&drvdata->csdev->dev, "%s: released\n", __func__);
-       return ret;
+       return 0;
 }
 
 static const struct file_operations tmc_crashdata_fops = {