Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp356869rdb; Thu, 30 Nov 2023 06:44:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHW95iKYHU18UhbX3Qc8nTFJRkk8C+/4p4AtlhIGgIYO7VVncv/fuRDGr9o6V/2vRu0PhrZ X-Received: by 2002:a17:903:2596:b0:1cf:9d88:a0ef with SMTP id jb22-20020a170903259600b001cf9d88a0efmr18542289plb.59.1701355491114; Thu, 30 Nov 2023 06:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701355491; cv=none; d=google.com; s=arc-20160816; b=H6ECmUk153pgGTvwR1TDzflnPqBoOB+kyx9kHT9dYKnbORTbxxJgkEC2aD2lYfZD3i XL6UEfKuJdXo3EnEU33jyXP30s5e0/I/x8TGguB8QK4ucfbjy2Ah509ZW8AyE2HoomZF RdtcI1g7dkHlABLvjtqdo3Ocuxjyfy68ZpERJxL+2CmMfeNRhdSjp9XUABXTsdJfxIqe ZvVvxngznaqRoxR39djpEs+Ku8Wktm/Lc5B7F5IeuYxAKMjRvHnB9E3ThRIR4AcNWo+l eANfBVNPRlSswi7kJXGj+P6NerT4DeiFUtwa49QEskKkz7eeSmuv5gW9G9H1f+IbNBHA QoyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bs6UY2PfteyBl/NtHL4Vq+zK47CXhnpbARgG8lahVXg=; fh=yhJTVAAzrj4nlMgsFw7V3s2RK529c4/Z3/peL0BrKbg=; b=j7tISA02Q+e/MXek6QZlvTNVF3M/DnQqoQcVILVagIjrm9c2O+uhE8dGm8wNaETZs6 KFVnbNsNamnx+JWtjGN0xhVmmu46Hai6j/Ars3N4CEnshYZHtcMfUfXMf+Ri260iLfnW 8fMWPY5H9uSfhUfOHX59BJV6nJVs33Y40/xquqCWqmLMenWwbmXBfgJAajjPRnJYmQqO tBqz5dJ6hv2GnzNovX/rJEL/W2lRtAetWDeHYghs9I3UpLiTMJPZXjp09HS6B0Eg5eKP Gmr1U3+LIJk318HuE33aLAjbSlv9V4cBoWbjHbPkd5fs86gu3TkzJT48YDPksNeDEyPz swJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mcsjg5+H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ju9-20020a170903428900b001d00a866032si1254590plb.223.2023.11.30.06.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:44:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mcsjg5+H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A1D35802389C; Thu, 30 Nov 2023 06:44:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346024AbjK3Ooa (ORCPT + 99 others); Thu, 30 Nov 2023 09:44:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjK3Oo3 (ORCPT ); Thu, 30 Nov 2023 09:44:29 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D5B493 for ; Thu, 30 Nov 2023 06:44:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701355476; x=1732891476; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=QHhP3rK7xvF2dxKYGJ733/CnziXsZ0+hcVS42FWQ11s=; b=mcsjg5+HBsNwIv/nOJNhc6SDxuW/f/07XE6EOCS5380ctu0BQll1W37b GEDOPk5aiBR9PGPgn0mSPQOAGjnOLsjTlp9gAKUGsCjNrs4ka2dJ5EF4F +CIkzlpRMGLQRN5sN8KWyDeBbqW9/m0n9lUVKnIk7pCkQ2z2Xr2C7vkCD 9ihF9+/EV1akX0j7MCcu0XQ7LQiMnByZq+tK5mK2oMFlBX6zzyLOqvSHA 6/y8vyfxI3kfqVzLt14j0ff8SNI6ftKNlYwRf1SyMjB2EVqDBSek96bI3 17Uk+uqcfprL70ywQHWU+fKSLyEIHu6+4XaXCqnxe+aQShJEg0crPYJNJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="392196898" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="392196898" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 06:44:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="887262414" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="887262414" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga002.fm.intel.com with SMTP; 30 Nov 2023 06:44:34 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Thu, 30 Nov 2023 16:44:33 +0200 Date: Thu, 30 Nov 2023 16:44:33 +0200 From: Heikki Krogerus To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Lee Jones Subject: Re: [PATCH v1 1/1] mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors() Message-ID: References: <20231130143206.1475831-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130143206.1475831-1-andriy.shevchenko@linux.intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 06:44:48 -0800 (PST) On Thu, Nov 30, 2023 at 04:32:06PM +0200, Andy Shevchenko wrote: > The pci_alloc_irq_vectors() returns a positive number on success. > Hence we have to filter the negative numbers for error condition. > Update the check accordingly. > > Fixes: e6951fb78787 ("mfd: intel-lpss: Use PCI APIs instead of dereferencing") > Reported-by: Heikki Krogerus > Signed-off-by: Andy Shevchenko Thanks for the quick fix. Tested-by: Heikki Krogerus > --- > drivers/mfd/intel-lpss-pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c > index 8f5e10817a9c..4621d3950b8f 100644 > --- a/drivers/mfd/intel-lpss-pci.c > +++ b/drivers/mfd/intel-lpss-pci.c > @@ -44,7 +44,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev, > return ret; > > ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY); > - if (ret) > + if (ret < 0) > return ret; > > info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL); thanks, -- heikki