Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp661760imm; Fri, 29 Jun 2018 04:25:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI6U5VR+jQkDiCrfZdlM7YQKmcAlML5wyZ+evmu4W6yBUecI6EzaWg/1mKCYC3pYTgjD4gb X-Received: by 2002:a65:6252:: with SMTP id q18-v6mr12466587pgv.106.1530271520225; Fri, 29 Jun 2018 04:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530271520; cv=none; d=google.com; s=arc-20160816; b=nrmqwHIxMcPzEqCKGMrh6EhWn2DQlZDDQ1nKasIR7kJ4qBpn81GRvx+btFDSB4YnR9 /kozrskXRKAi61breaIv99ijOzPskv9JGxOaG4UmQcm7HVKyHegNf7l7vzfeq0HEkt1r z6h4bcM2w7l6rTOCC6IlmLyv5bmrw9qkE/QS7oQfmJ8Rvc2FU06+5Yyxd0RBkivY1xB3 4EzDnQJwSNwXQvJpyPLXnkVDnc0eDSQ7/d6jB5Pm96YH9AQuDtAEzx9wDuBa5EtM8wdy 1wUHEU6jKNG3CUvInwov4mqLP1C2EJu6Pbev5yKlRKHYwpjPV9aC+6w64NIIl1Rk+FTo QydA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:date:from:references :in-reply-to:message-id:arc-authentication-results; bh=WoQBU4Z7Z6TBPB24Wq5RVLEmwLs11pDH/9C9KT7STY8=; b=HK7I3B91bpC9BBQR8acwTfWBUeyUQKzX0cC0EZzPJD9wswDvgaKA94jpdUohCZ9+/R S+9Z1YgHoDPTtQq0LvFJJP56HXw5Vc2QrjZC3DtU4bbnNe9LPHJoGcq01ctEUaS2fMVL 18DIMWgzdGLTH5X91ybQlXpOix2Y3NAROR7r0nfPr7C0Hu4LhoZ+vyT5rkWGfuh8zH/u fOm/Ci+RD7lDK5ydn1CF1EukYox3F4/5LIgJzJj8PznUUxAD+RfxQQkYBuWrHb8KyMx6 vBiaLMnYYGapwAdLFiWF3MHCbYQNefQRJpsLImQYsw2NnFsrRyhDxr+99FDhNMX44bEz vy5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si8722053plb.279.2018.06.29.04.25.05; Fri, 29 Jun 2018 04:25:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964899AbeF2LPi (ORCPT + 99 others); Fri, 29 Jun 2018 07:15:38 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:51594 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935467AbeF2LPd (ORCPT ); Fri, 29 Jun 2018 07:15:33 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id DEA9141BDB; Fri, 29 Jun 2018 13:05:34 +0200 (CEST) Message-Id: In-Reply-To: References: From: Nikolaus Voss Date: Fri, 29 Jun 2018 10:19:58 +0200 Subject: [PATCH 2/3] IIO: st_sensors_i2c.c: Don't print error on failed ACPI match To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lorenzo Bianconi , Linus Walleij , Xiongfeng Wang Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If there is a ACPI node for a i2c device but HID/CID doesn't match, there could still be a ACPI_DT_NAMESPACE_HID / PRP0001 HID entry which is matched against the i2c device ID table, so don't print an error message. Signed-off-by: Nikolaus Voss --- drivers/iio/common/st_sensors/st_sensors_i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c index b81e48e9f27e..0c1a77f9b08c 100644 --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c @@ -87,10 +87,9 @@ int st_sensors_match_acpi_device(struct device *dev) if (ACPI_HANDLE(dev)) { acpi_id = acpi_match_device(dev->driver->acpi_match_table, dev); - if (!acpi_id) { - dev_err(dev, "No driver data\n"); + if (!acpi_id) return -EINVAL; - } + driver_data = acpi_id->driver_data; } return driver_data; -- 2.17.1