Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1266478lqm; Thu, 2 May 2024 09:31:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCS76W2nn3/HEx8SC6p3EO6VJqUF3f+vo80cpuwBDT1hkC1WqbUZBRX9QaM2HA3t9Yk+aHJ+i6xoWiLiGuPsmBVhZCFmtvnjuW9qcufQ== X-Google-Smtp-Source: AGHT+IH6UaRSvwTq+S4aX5aTOQn+MwKOdUuY67APO83DZyDOvcATS28RZY5ogxodHh0R+pFuCeOw X-Received: by 2002:a05:6a20:1a87:b0:1a7:c31:2695 with SMTP id ci7-20020a056a201a8700b001a70c312695mr157976pzb.50.1714667505634; Thu, 02 May 2024 09:31:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714667505; cv=pass; d=google.com; s=arc-20160816; b=BISvwmHwV5k29vxKsnKib3gmxW9ZSWrL9kBebGLdP4cr96Ubc6AvJew9WUsM3uIEz4 mALrSrTGkxE7WkrpLNg/kO9L65otDJM2eOghSgPL06dPQezYXx2tfDIqH7k4CwrpwXcR jnzB6BwnflGOVnB3P/8IY8Lyk5L5uI8VdWRIZfr1BRvkoYWBOXotb1nzFn6SmLpwWuKP jxCS5kUoTVJpnQI5C5Xj8sLsiXNuYN+I2MeZNSEOacMgsNNwiKHLHaBfJxzddx7RDVyV ARwRc/WBWcfdd2iR7XwE0qoZOqkJtihUthjPWXa32CBwubTxzgA0auROvNUSuaYHG75c 2b4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=5IqX86MvYbkMaFLjZjBIRmlrcBhqvsnynsm37uOsPSw=; fh=Uohns/4f5kvIKIoI96Bc/YL71RVPifFeE59Ps+5zCYM=; b=R447DfX8qaKULGVKwzNkbtsbE4Mx6lxD6LfkV88g7PlMrBA1nEuLUQ0PsvIB2SP0I0 dUXXVpzo4FRdNmulGhD5YR/91fta5uejCwHG0JVeZcgCTsNNRjzJI9iNiNxesL6NzRAB vSkgZLv3oGpUIyt3Y7L7Ze4TmvqtK/xVsF0C4gJqL4YqJ4JVDQwStdJog12uGcTjOOYQ bAdTwwdO7yaMsE42vaNGemHS8nETT0uOlzCCuQCV9jb+33IaXMgiZg97ZFNk77L3LHu+ bBaX/XbZxB48KHFvtV+xOhe0mikr7JXP8/t7TZ3x5kHqJ0VlbZT3779Fr2SIKRgg2l6+ qCbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kyWnJfdj; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-166633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m2-20020a63f602000000b0061ae2145edfsi773518pgh.459.2024.05.02.09.31.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 09:31:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kyWnJfdj; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-166633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 47DA1B24392 for ; Thu, 2 May 2024 15:24:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A3B215B13E; Thu, 2 May 2024 15:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kyWnJfdj" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8686C15A4BB; Thu, 2 May 2024 15:23:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714663434; cv=none; b=SMmFbL9DiKvs7rryRWqmuKc3WKIu0Z2y9zkA0yQCr2v7xCeF49ZrGpoGGgLBXf9RSKFSg7YX8A1+QqAXj8hddKbkEzR72C2DtewfTEFRMhjU/Lif4CR1Ez0r1v3qCRtsNytuFNWIImjBpmWYQIe4e7pxkcDtthmhjisGdGbYhgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714663434; c=relaxed/simple; bh=5IqX86MvYbkMaFLjZjBIRmlrcBhqvsnynsm37uOsPSw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=d4RudI2DBXMGwS+esPGSM9VOCaZLKf7rG5StGQa2TE+7x2TPvZeTGahgvuMipi8yQl6GHesiZIDx7V5gvndTQMwKjg6qLOcy3DpvhLSYXOJ7FOKqW5vuuOZ+iO6f78T6co6skhACSSjhGygUztTiLpqgMbTSF/TpIag6NHaXkB4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kyWnJfdj; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714663433; x=1746199433; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=5IqX86MvYbkMaFLjZjBIRmlrcBhqvsnynsm37uOsPSw=; b=kyWnJfdjlNk2GKGRRIc3NOjVotX7d8rljU8iibnx720TCYCAdDtqbtKT gdazrfUPeAf1Vtqm15AdvwM9MLLc0TMetUmDrvXVwYOokhE9NKWoCtxxl +jbbn/FJ1L3AwJBtmcRRILyD4IKwiOOhA/CNt8ao2B3W4v10DlfRPIwrN rxs9PiXIHfvxyX8rlZHUANsAKXocYMSirU/uibt1l3qJgrEFuCWG+45Ln +xXBC2XwK9qnag08x0lt++iUnNZtJBaxTFNUEEMpvyRRaiDvt5yAReCxP QslYzz/shKWrR/e5xD2DlxyVqPMgZGejUVCta49x/sTWfzx92LzUduGJN Q==; X-CSE-ConnectionGUID: R+xPVCEMQ/KjPmljZeFusQ== X-CSE-MsgGUID: POnIa/7RSUuP0iuYpmwu5w== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="21584940" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="21584940" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 08:23:52 -0700 X-CSE-ConnectionGUID: CtuVBYUDR8uJXodxLwfJCA== X-CSE-MsgGUID: F4o+jrUySKmJh0QWoWsY7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="27256247" Received: from spandruv-desk1.amr.corp.intel.com ([10.125.109.143]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 08:23:51 -0700 Message-ID: <95fadbf4772d575bff777ddb738cb6c25b85b779.camel@linux.intel.com> Subject: Re: [PATCH] HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors From: srinivas pandruvada To: Chen Ni , jikos@kernel.org, bentiss@kernel.org, even.xu@intel.com, lixu.zhang@intel.com, kai.heng.feng@canonical.com, hongyan.song@intel.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 02 May 2024 08:23:51 -0700 In-Reply-To: <20240429085422.2434036-1-nichen@iscas.ac.cn> References: <20240429085422.2434036-1-nichen@iscas.ac.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-04-29 at 16:54 +0800, Chen Ni wrote: > Add check for the return value of pci_alloc_irq_vectors() and return > the error if it fails in order to catch the error. >=20 You can write as " Add a check for the return value of pci_alloc_irq_vectors() and return error if it fails. " Thanks, Srinivas > Fixes: 74fbc7d371d9 ("HID: intel-ish-hid: add MSI interrupt support") > Signed-off-by: Chen Ni > --- > =C2=A0drivers/hid/intel-ish-hid/ipc/pci-ish.c | 5 +++++ > =C2=A01 file changed, 5 insertions(+) >=20 > diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c > b/drivers/hid/intel-ish-hid/ipc/pci-ish.c > index e79d72f7db2a..9b9bc58f0524 100644 > --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c > +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c > @@ -174,6 +174,11 @@ static int ish_probe(struct pci_dev *pdev, const > struct pci_device_id *ent) > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* request and enable int= errupt */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ret =3D pci_alloc_irq_vec= tors(pdev, 1, 1, PCI_IRQ_ALL_TYPES); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (ret < 0) { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0dev_err(dev, "ISH: Failed to allocate IRQ > vectors\n"); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0return ret; > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > + > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (!pdev->msi_enabled &&= !pdev->msix_enabled) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0irq_flag =3D IRQF_SHARED; > =C2=A0