Bug 80231 - drivers/platform/x86/thinkpad_acpi.c:6147: pointless test ?
Summary: drivers/platform/x86/thinkpad_acpi.c:6147: pointless test ?
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P1 low
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-14 21:34 UTC by David Binderman
Modified: 2014-07-17 14:37 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.16-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description David Binderman 2014-07-14 21:34:59 UTC
[linux-3.16-rc5/drivers/platform/x86/thinkpad_acpi.c:6147]: (style) Checking if unsigned variable 'value' is less than zero.

static int brightness_set(unsigned int value)
{
    int res;

    if (value > bright_maxlvl || value < 0)
        return -EINVAL;

Suggest remove pointless code.
Comment 1 Andrey Utkin 2014-07-14 23:00:16 UTC
Thanks for report, submitted the patch https://patchwork.kernel.org/patch/4550021/
Please close the ticket.

Note You need to log in before you can comment on or make changes to this bug.