From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939617AbdDSU4u (ORCPT ); Wed, 19 Apr 2017 16:56:50 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:41048 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938126AbdDSU4r (ORCPT ); Wed, 19 Apr 2017 16:56:47 -0400 Date: Wed, 19 Apr 2017 13:56:44 -0700 From: Darren Hart To: Carlo Caione Cc: andy@infradead.org, andy.shevchenko@gmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com, Carlo Caione Subject: Re: [PATCH] hp-wmi: Do not shadow error values Message-ID: <20170419205644.GD17351@fury> References: <20170419203639.28788-1-carlo@caione.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170419203639.28788-1-carlo@caione.org> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 19, 2017 at 10:36:39PM +0200, Carlo Caione wrote: > From: Carlo Caione > > All the helper functions (i.e. hp_wmi_dock_state, hp_wmi_tablet_state, > ...) using hp_wmi_perform_query to perform an HP WMI query shadow the > returned value in case of error. > > We return -EINVAL only when the HP WMI query returns a positive value > (the specific error code) to not mix this up with the actual value > returned by the helper function. > > Signed-off-by: Carlo Caione Queued to testing, thanks Carlo. -- Darren Hart VMware Open Source Technology Center