Skip to content

Commit f8dc439

Browse files
ColinIanKingrafaeljw
authored andcommitted
ACPI: pfr_telemetry: remove redundant error check on ret
The variable ret is initialized to zero and a littler later in the PFRT_LOG_IOC_GET_INFO case of a switch statement is being checked for negative error value. Since ret has not been re-assigned since the initialization ret can never be less than zero so the check is redundant and can be removed. Remove it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20241014130522.1986428-1-colin.i.king@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 42f7652 commit f8dc439

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/acpi/pfr_telemetry.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@ static long pfrt_log_ioctl(struct file *file, unsigned int cmd, unsigned long ar
272272

273273
case PFRT_LOG_IOC_GET_INFO:
274274
info.log_level = get_pfrt_log_level(pfrt_log_dev);
275-
if (ret < 0)
276-
return ret;
277-
278275
info.log_type = pfrt_log_dev->info.log_type;
279276
info.log_revid = pfrt_log_dev->info.log_revid;
280277
if (copy_to_user(p, &info, sizeof(info)))

0 commit comments

Comments
 (0)