From patchwork Tue Oct 25 08:51:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 13018759 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 767BDC38A2D for ; Tue, 25 Oct 2022 08:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbiJYIvq (ORCPT ); Tue, 25 Oct 2022 04:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231918AbiJYIvg (ORCPT ); Tue, 25 Oct 2022 04:51:36 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32D22104538; Tue, 25 Oct 2022 01:51:30 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id z24so5908094ljn.4; Tue, 25 Oct 2022 01:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=o3rqVRlWpSG6VhxIJc6elhskuf/gfvFUZOs7XfqtDQ4=; b=PhT/oTUlDmRpv0Bb4JK6SuAV7SfeTBOaUeARe12U3pXsQ7U6TVJ2j5K2k+atR1d8vk tM/06kMcF6NbAP8TlOctINFiaTlEF2XMyhRbCtE3My5IfILstolxutOF1+WRdmdj1OBr fG0P0VIZAdmF7Dz9JUDKWM1fv5k2I8t3IBkfuaITggVmkgB5oDpcI0AUVJfc2k/h4hiU VsWRL5Jdq2PK4sTYIC1eAssKvX0VZWKLUzA0ovT9Z9endNqdJtA6eH4DCtzU1wlIaVaV JkV+gpAEOe0PykcmX1dq819Vu+62ZyojEfUVJRg4VqR6fFB1oFL4hkTndCwfOUW354sb AW9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=o3rqVRlWpSG6VhxIJc6elhskuf/gfvFUZOs7XfqtDQ4=; b=Oq7ZGncmFMBoFjDydRf/8mfd8c27jpd3jIJvjmzi3AiVhIzVX9q1mzS7qf9g2hG6BA ku7rMn1IzbPu7V2IWUwzcdX+vx/48i+9Sa5KAtcII7T80uXOkdOyvZieCUEMJG23Jlcx ybstn2srDuOlm9p+KCfSZUWHw/B3DpCqX1O+UIdAeGJ0giDM6DBFfPPWxPhOVJUETXWI yccr7/XO19Ci+u90s8+iDPF0LKS+xPQ285kgA8z921xi98WSsqGbvf0E6B3CxGuL/lUd lBXw8XIBIfOvbr0fUMvM2w16+0Cojd8jyyjkGd5vsZtZN+EXfSutOdrMH4cx03MV5xyg DqRw== X-Gm-Message-State: ACrzQf3hDivAcd58MLKtvM8hG3GAqMYFWwZNSnwOiBy+0CeHdSVqltv1 /fToWH3PEaiXfR/wCnIjDHg= X-Google-Smtp-Source: AMsMyM74Jng8VYpXW1kaXxr8PkbuDusArrxPGpGFkyFF195SvESqix+NnNDVN3E1lw3x2QQmuF19ig== X-Received: by 2002:a2e:8541:0:b0:261:b44b:1a8b with SMTP id u1-20020a2e8541000000b00261b44b1a8bmr14594268ljj.46.1666687889255; Tue, 25 Oct 2022 01:51:29 -0700 (PDT) Received: from dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi (dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::2]) by smtp.gmail.com with ESMTPSA id p8-20020a2eba08000000b00277041268absm383931lja.78.2022.10.25.01.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 01:51:28 -0700 (PDT) Date: Tue, 25 Oct 2022 11:51:22 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Wolfram Sang , Akhil R , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH 2/2] i2c: i2c-smbus: fwnode_irq_get_byname() return value fix Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The fwnode_irq_get_byname() was changed to not return 0 upon failure so return value check can be adjusted to reflect the change. Signed-off-by: Matti Vaittinen --- Depends on the mentioned return value change which is in patch 1/2. The return value change does also cause a functional change here. Eg. when IRQ mapping fails, the fwnode_irq_get_byname() no longer returns zero. This will cause also the probe here to return nonzero failure. I guess this is desired behaviour. --- drivers/i2c/i2c-smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 07c92c8495a3..d0cc4b7903ed 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -130,7 +130,7 @@ static int smbalert_probe(struct i2c_client *ara, } else { irq = fwnode_irq_get_byname(dev_fwnode(adapter->dev.parent), "smbus_alert"); - if (irq <= 0) + if (irq < 0) return irq; }