Bug 80231

Summary: drivers/platform/x86/thinkpad_acpi.c:6147: pointless test ?
Product: Drivers Reporter: David Binderman (dcb314)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: RESOLVED CODE_FIX    
Severity: low CC: andrey_utkin
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.16-rc5 Subsystem:
Regression: No Bisected commit-id:

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.