From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 659ECC43381 for ; Sat, 30 Mar 2019 20:29:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39FFB2184D for ; Sat, 30 Mar 2019 20:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553977790; bh=Hj4MS7a8leOJhoIwz47oIYOUtfWadmoA74OgKm4+ufw=; h=Subject:To:Cc:From:Date:List-ID:From; b=HORnax7gv3SkqSv3IyHDlB2xK2GygAobk2Z4RzlC5GCMfx1w5njR613slWaYMxojr gxMyTgBcvNybYHmxWZ4ScrOvhli186mmaq4Ce3/PyITwDjTvZrtcwlCicHew3rnZ59 IRT+TpRHDd5SDGSNOW0AbsALExB4eEh8zPVHoRm0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730215AbfC3U3t (ORCPT ); Sat, 30 Mar 2019 16:29:49 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33011 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730619AbfC3U3t (ORCPT ); Sat, 30 Mar 2019 16:29:49 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 952B220EA9; Sat, 30 Mar 2019 16:29:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 30 Mar 2019 16:29:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=98+bea H7kK4XuLOXiLSgcgr8jUiDZU4weWipkdmcYJA=; b=d9uMaw5g03fblw3FIgcZS9 K2bApuM5ymS9CXVoHPhEjoJgK1iItGpO55PBrhs0yTUdAWR+2A2GFx9XnOXdJHd0 x5veamt2n5B7P10Puz8tCtJHmpU9joZL2tbgWih7qi0693HPdJgZ2ajB6r/Lazyh aCKpzb0HayT2Yl21gZX6Da2QhLYeoA5u6M+VTFw7d9blbpodC1BJQNP1PFPSm/hU GPpoTSyQ2B7y5mr8Zl1KIfgQ3TuWdp4TToH500Zm+cPUefRBNahGKni5Xr6gbRvf gcugMfDyP285erNDL2TUq4qmATvPy7EboMSP7YfjQBqOnPxIlcuay8Xj6GzbEtZQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkeelgddufeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeeivddrudduledrudeiiedrleenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepge X-ME-Proxy: Received: from localhost (unknown [62.119.166.9]) by mail.messagingengine.com (Postfix) with ESMTPA id D14471031A; Sat, 30 Mar 2019 16:29:47 -0400 (EDT) Subject: FAILED: patch "[PATCH] usb: typec: Fix unchecked return value" failed to apply to 4.19-stable tree To: gustavo@embeddedor.com, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, linux@roeck-us.net Cc: From: Date: Sat, 30 Mar 2019 21:29:02 +0100 Message-ID: <155397774221632@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From e82adc1074a7356f1158233551df9e86b7ebfb82 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 18 Mar 2019 16:18:30 -0500 Subject: [PATCH] usb: typec: Fix unchecked return value Currently there is no check on platform_get_irq() return value in case it fails, hence never actually reporting any errors and causing unexpected behavior when using such value as argument for function regmap_irq_get_virq(). Fix this by adding a proper check, a message error and return *irq* in case platform_get_irq() fails. Addresses-Coverity-ID: 1443899 ("Improper use of negative value") Fixes: d2061f9cc32d ("usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/usb/typec/tcpm/wcove.c b/drivers/usb/typec/tcpm/wcove.c index 423208e19383..6770afd40765 100644 --- a/drivers/usb/typec/tcpm/wcove.c +++ b/drivers/usb/typec/tcpm/wcove.c @@ -615,8 +615,13 @@ static int wcove_typec_probe(struct platform_device *pdev) wcove->dev = &pdev->dev; wcove->regmap = pmic->regmap; - irq = regmap_irq_get_virq(pmic->irq_chip_data_chgr, - platform_get_irq(pdev, 0)); + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "Failed to get IRQ: %d\n", irq); + return irq; + } + + irq = regmap_irq_get_virq(pmic->irq_chip_data_chgr, irq); if (irq < 0) return irq;