Re: [PATCH] drm radeon: Return -EINVAL on wrong pm sysfs access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/3/23 Thomas Renninger <trenn@xxxxxxx>:
> drm radeon: Return -EINVAL on wrong pm sysfs access
>
> Throw an error if someone tries to fill this with
> wrong data, instead of simply ignoring the input.
> Now you get:
>
> echo hello >/sys/../power_method
> -bash: echo: write error: Invalid argument
>
> Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
> CC: Alexander.Deucher@xxxxxxx
> CC: dri-devel@xxxxxxxxxxxxxxxxxxxxx
>
> ---
> Âdrivers/gpu/drm/radeon/radeon_pm.c | Â Â8 +++++---
> Â1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> index 2aed03b..08de669 100644
> --- a/drivers/gpu/drm/radeon/radeon_pm.c
> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> @@ -365,12 +365,14 @@ static ssize_t radeon_set_pm_profile(struct device *dev,
> Â Â Â Â Â Â Â Âelse if (strncmp("high", buf, strlen("high")) == 0)
> Â Â Â Â Â Â Â Â Â Â Â Ârdev->pm.profile = PM_PROFILE_HIGH;
> Â Â Â Â Â Â Â Âelse {
> - Â Â Â Â Â Â Â Â Â Â Â DRM_ERROR("invalid power profile!\n");
> + Â Â Â Â Â Â Â Â Â Â Â count = -EINVAL;

I think this does not match kernel coding style (braces).

-- 
RafaÅ
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux