Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp423644pxy; Wed, 5 May 2021 05:41:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwysn/3gbcNrygdjDHg4XkYGK2sE+bhJ3cqGe5+v1paUGwKuijvHKqXmrLqh1MTSc4TZzO1 X-Received: by 2002:aa7:85d0:0:b029:28e:80ff:cbf4 with SMTP id z16-20020aa785d00000b029028e80ffcbf4mr17056295pfn.59.1620218478024; Wed, 05 May 2021 05:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620218478; cv=none; d=google.com; s=arc-20160816; b=Pp6phSjvCLtA/e8eGqHzvJS8sE6ul3M7toEvZ0W5uLqHNoln+YGuCdBcSEGcVIKNBw Q/Tb3rM173qN3bCblQihnZUh7hX7oghOQDvDYWdWmCZ273Q9gYL39YZ1uhhv7/FJOZvw 5g3NNyDwrhQY/i8j/dEvS5LFLDyNYId5gRMfRjbzb/o77IeqzsWpVIg6Z44pPOh4uZ6N pcb3DTBqcWt/O2n87UWZttjvjLuqiExAO5LIbWy1CS/woXmjg2YR/TtcP69daJ2p2peT nAPQcdPwkBF3GL24QG41alLVHU9x03jQ0y7vGEtXiYJnhy9EFYuGisa0d96WoSkIk+I7 45fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=xfu/90DQcx2hIRkO/FIBIk0cdJgzMqtcs+jVKGC9P2Y=; b=r7uotiSbMkshnND60/a1VvgeeSzW93305i+BXNxHd5LVlg0nVLY4cEeB7WxlpXfyFI /3cgwjV5kG/PKFqx6Nuv21c96FxeUk35Tdcbxb80lR42TGiTB7lPACohl2zSESfNWmuK UJhDEBslKkBioXRadnBR8tyrn0m3imlb81ggJhnLf9WUlPzTOawLgkk3+M2KrXcsTE87 W61EhWlsCuGZkD5h98oUEu7te+KIO0o86z++lR0pj7FNHPKSl8fWoyyyvn+wrLnSQCIA YeVA3KmzS8dBHXGGUPZCUEEycWzMyHkhB11H9H9/3/A+Xf5E6ATFLlqBghdyeX9gP26i 3Mfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D59oFyJH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si8373639pjp.99.2021.05.05.05.41.04; Wed, 05 May 2021 05:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D59oFyJH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233470AbhEEMjb (ORCPT + 99 others); Wed, 5 May 2021 08:39:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:53818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233555AbhEEMjL (ORCPT ); Wed, 5 May 2021 08:39:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0FBEA608FE; Wed, 5 May 2021 12:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620218294; bh=/+2VzFRJPGasWSU5GhWAr3OrK3XekxrSTsUlVTbikPY=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=D59oFyJHUt9CttXDsUimugJnjeOHwFL1YmM4DQ0BXW5gQqOH1qJUlYqUwlHPLduNI gXkaQv0wTHqG8G0+Ac6zApU6wsb8s881hbwSVph2nIJjqD2HWjZ08G2NgJTWJ1tl30 uQQ64Slbd4aUP9hrM+fzTK5pH/dbShuK93JOPxpd6YR0WvtnErk9uo6vgEFw2zvJsx 1xvbD9yFw8nEfhP3AOgjewQiNBhFieOOe3E2J2BiGzHU0e3QfBYi1vyFCNzGaYvUoA l66NMR0T10dN9t8KeDIecQjaYxROf112+JlZkYtxzkd4PRsReTDTj2lS0cUuEqIQZH +0OHv88r9uxPw== Date: Wed, 5 May 2021 14:38:11 +0200 (CEST) From: Jiri Kosina To: Srinivas Pandruvada cc: jic23@kernel.org, benjamin.tissoires@redhat.com, jiapeng.chong@linux.alibaba.com, linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH 2/2] HID: hid-sensor-custom: Process failure of sensor_hub_set_feature() In-Reply-To: <20210415185232.2617398-2-srinivas.pandruvada@linux.intel.com> Message-ID: References: <20210415185232.2617398-1-srinivas.pandruvada@linux.intel.com> <20210415185232.2617398-2-srinivas.pandruvada@linux.intel.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Srinivas Pandruvada > --- > Replaces patch: HID: hid-sensor-custom: remove useless variable > by Jiapeng Chong > > 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