Received: by 10.223.164.202 with SMTP id h10csp895333wrb; Thu, 23 Nov 2017 07:56:55 -0800 (PST) X-Google-Smtp-Source: AGs4zMZEatj8noPMFFcDL9Tfs4RI+DWok2qQOaaO0sABk6BfIMWFeMSODNyg9ezhkQWztdnxv0JO X-Received: by 10.99.39.198 with SMTP id n189mr23842875pgn.78.1511452615511; Thu, 23 Nov 2017 07:56:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511452615; cv=none; d=google.com; s=arc-20160816; b=nFdZs+OtC4AfCTQZXZEyaHK+aZT3mEzApw6Uj8j8W4aEWNQbgOJTUSU6TeKlhjDugE SzhZCE2NA2ttEgndyM7Dgl4jOJtmTlo/GmrEmAW9MgvAiKf9l+nlQrKWG1EkGdPIvkJX L2ykLv7LKej5ekqL8IRMpjce92GtE2gX5/KxnB6go45PZxXOQtFYJko3M8/DFruscTLS rOZTOExTJ61p3U4Nj65uSmf7rB1azQbBMkZgXU6s1UeZ07T2Mn2WPTRd5XeI3v7tldMz 0OWQMyrTcPO1UW1oq+35aByfG3qzBmTKZpSmflguLn+e9XARsO/WvZ8EjHd2q5L6Wi1M PN+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LpI0i3dta4RHFByhAnVKIPY4ztg7HvzFCD2ThigVFq4=; b=DHzHkGukpN1Ok5jpceKQwsWSCOTTTBh2xHHILza3R2DzoySGsO6N5t60HQGsCopLNZ 8LXLA44re7OFMusuqA7AS4EwDh/xYF3hqyLlIRxMqipbW2QFjxuy3mercLcx8Cur94nK VvO11JawOsvbfo3iBbiTL685kGRBvF/3QwovjSmaa3pIF+6LOz0zyZRfDvmljKBuC0jP DYVdJVTiBsAxBdIyvlPF3/U6akohIoE/aqXnNsgUv7YoGVI6uu6WLPOoLChCLHnHfM89 t+a5HHDC1kgzlK7wEkrzWvbamalT3hGs+wwDALtYo2kNsgEpHcMczs+34tAeJtyZnFY7 XtoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M+k2ICw5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si16302349pgs.459.2017.11.23.07.56.44; Thu, 23 Nov 2017 07:56:55 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M+k2ICw5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbdKWP4B (ORCPT + 76 others); Thu, 23 Nov 2017 10:56:01 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35435 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752964AbdKWPzp (ORCPT ); Thu, 23 Nov 2017 10:55:45 -0500 Received: by mail-pf0-f195.google.com with SMTP id r88so9718768pfi.2 for ; Thu, 23 Nov 2017 07:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LpI0i3dta4RHFByhAnVKIPY4ztg7HvzFCD2ThigVFq4=; b=M+k2ICw5Ypq/iKM8XqX0Nc5G7bi2iU1mdSvbNFGXxUmHhvAdZkQ7BP1mnhzHTbp/jM +XDmQbZPXK/a5hDR68vaNcl1hoVsv2eUiGBJZyWGeXcx5kFGeqd2N83CJ333Q2mOFxmD 8GSTT08MZ9HSbM6ZtJnrMRgUF/OdIKTgGpkecTHvpKLyWuudvQURnO0Syh77yGM8OcXK 333qUq9wMnVi6G8yrEOpD3Lni/bmFuNmS7JTRoWhjKwSc94sTDV3Dd+VKhIx792GNAqT qv4gUp6bQBC9a2w9wBzA7dWn5Vsr+/oSt/D3OASK8waJrFobCOKtMVZgYR8yCFvp7pcY DXaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LpI0i3dta4RHFByhAnVKIPY4ztg7HvzFCD2ThigVFq4=; b=Xf+/rHKt8jYlDgDKZjp+QksxiIVnaItdXh+Xjm0mDjzIMoaWOrIKx74npNhm1j62o8 PH9ZpBHUCijdwFoObVA7LrAjpY03Ip0Xxucg0mSxapgquqwcNECm9dEaFmXn/+axJUFk fhkRAi6phYx2jlM77/u+bW0o8KIZiY4CwVakcCiKpS1DC1IY12eM0JpVaJ/4nROVlTp0 nGmCOm9WmxCihRN1gDO+z3rCjd/yACJKdrarndR+f4l6Lci5gWGP2UecIqFV0WTCMhDo 7WI8FtdlI7sT641gsQ1c5aZBfmR34xKxJ1+FgFawNIA1TOa8Adfn+w5f5TGl8xULE+78 9vCQ== X-Gm-Message-State: AJaThX7vzqd8Uo1xycZwGhqivv5ex+UwIeuFV+nJ5V+OmKPRDEMGYbkj Jqvl/8NO8rMzayJ+9V1j2/k= X-Received: by 10.98.246.22 with SMTP id x22mr23096005pfh.87.1511452544633; Thu, 23 Nov 2017 07:55:44 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id a87sm35747617pfg.159.2017.11.23.07.55.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Nov 2017 07:55:44 -0800 (PST) From: Arvind Yadav To: myungjoo.ham@samsung.com, cw00.choi@samsung.com, wens@csie.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] extcon: axp288:: Handle return value of platform_get_irq Date: Thu, 23 Nov 2017 21:25:30 +0530 Message-Id: <1511452530-16858-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511452530-16858-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1511452530-16858-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/extcon/extcon-axp288.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index 981fba5..e16a783 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c @@ -301,6 +301,9 @@ static int axp288_extcon_probe(struct platform_device *pdev) for (i = 0; i < EXTCON_IRQ_END; i++) { pirq = platform_get_irq(pdev, i); + if (pirq < 0) + return pirq; + info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq); if (info->irq[i] < 0) { dev_err(&pdev->dev, -- 2.7.4 From 1584390412136380619@xxx Sat Nov 18 08:07:23 +0000 2017 X-GM-THRID: 1584390412136380619 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread