Re: [PATCH 2/2] HID: hid-sensor-custom: Process failure of sensor_hub_set_feature()

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

 



On Thu, 15 Apr 2021, Srinivas Pandruvada wrote:

> When user modifies a custom feature value and sensor_hub_set_feature()
> fails, return error.
> 
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> ---
> Replaces patch: HID: hid-sensor-custom: remove useless variable
> by Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx> 
> 
>  drivers/hid/hid-sensor-custom.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
> index 2628bc53ed80..58b54b127cdf 100644
> --- a/drivers/hid/hid-sensor-custom.c
> +++ b/drivers/hid/hid-sensor-custom.c
> @@ -406,6 +406,8 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr,
>  								report_id;
>  		ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id,
>  					     index, sizeof(value), &value);
> +		if (ret)
> +			return ret;

What tree is this patch against? In my tree, we're not even assigning 
sensor_hub_set_feature() return value to anything.

-- 
Jiri Kosina
SUSE Labs




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux