From patchwork Sat Apr 13 07:23:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10899353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A55F71515 for ; Sat, 13 Apr 2019 07:30:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88FF428305 for ; Sat, 13 Apr 2019 07:30:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B84C28488; Sat, 13 Apr 2019 07:30:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A8C7028305 for ; Sat, 13 Apr 2019 07:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=qIudpkxij5GeJt5USJ0wfulfqF3xdCygTRC3IlUs1mU=; b=l1BrSrewnrs/fbH1hhxvMdRYXo 59BSW4ZhsbvTL8FDbJpE8nQZKWwKEdylWfqmc9fyRDxynuWyP7pqX1YUxjPQRN+rQ6KjByXlRAibG Gja+qbgSsH+OfaRG1OM17DV3LgCs0hWMIPCHoKT/q7zjV31M/EnASiV5gRLXlJKQjVmThaZdHOHBO vjLOSvQSyjCfjzMOMfDqkEFNJ6g3Vr+bH3l7wLcgAV8jLWbvrNC/q1N7dd6F9ZmYaWXC65IcfsdHg 6Jbj3mxE38XEcd82nM8PygzHebHzUBE+17xLmYFRHW01kOeLcmQHpPq4oxQWjxgZZYeire6mthn7y 3NLR3aUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFD7H-0001n0-71; Sat, 13 Apr 2019 07:30:23 +0000 Received: from www.osadl.org ([2001:a60:9266:ffff:62:245:132:105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFD78-0001bi-Pq for linux-arm-kernel@lists.infradead.org; Sat, 13 Apr 2019 07:30:17 +0000 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x3D7Sohc010572; Sat, 13 Apr 2019 09:28:56 +0200 From: Nicholas Mc Guire To: Russell King Subject: [PATCH 1/4 RFC] ARM: imx legacy: warn on failed allocation Date: Sat, 13 Apr 2019 09:23:30 +0200 Message-Id: <1555140213-1081-2-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1555140213-1081-1-git-send-email-hofrat@osadl.org> References: <1555140213-1081-1-git-send-email-hofrat@osadl.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190413_003015_372770_4EB39ABF X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mike Rapoport , Tony Lindgren , Shawn Guo , Sascha Hauer , Janusz Krzysztofik , linux-kernel@vger.kernel.org, Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Nicholas Mc Guire , Fabio Estevam , Linus Walleij , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Even in init the allocation can fail and thus should at least warn so that the cause can be identified. Signed-off-by: Nicholas Mc Guire --- Problem located with an experimental coccinelle script Note sure if there is a better solution as this is early in the boot process so not that could be done anyway but fuss - anyway unchecked allocation is not a good thing. Patch was compile-tested with: imx_v4_v5_defconfig (implies CONFIG_MACH_MX27ADS=y) (with some unrelated sparse warnings about unimplemented syscalls and a few checkpatch warnings - covered in the other patches) Patch is against 5.1-rc4 (localversion-next is 20190412) arch/arm/mach-imx/mach-mx27ads.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 6dd7f57..528846f 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c @@ -247,6 +247,7 @@ static void __init mx27ads_regulator_init(void) struct gpio_chip *vchip; vchip = kzalloc(sizeof(*vchip), GFP_KERNEL); + WARN_ON(!vchip); vchip->owner = THIS_MODULE; vchip->label = "LCD"; vchip->base = MX27ADS_LCD_GPIO; From patchwork Sat Apr 13 07:23:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10899355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D433C17E6 for ; Sat, 13 Apr 2019 07:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B532728305 for ; Sat, 13 Apr 2019 07:30:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6FAB28488; Sat, 13 Apr 2019 07:30:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 56E6D28305 for ; Sat, 13 Apr 2019 07:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=j+0doQCTjKRT0NBdSLu5LInjUCeWIRk3w1lEeMeEvNE=; b=uNZNva2aq5y2Ry009vS+N88ABb xUj+31FoJ08SURJseftSV+J5NABEKywrx8yOnYMRous2Al47Jk/szSh6W8ipCES4Xi3MoBaa9a2Ti 01rHHm/Fq6jrfwt9bekfxOqgud0ztun2mzRhqKfMVeYFzTW1MILDaS8CiVK1rJKaXp4lQ0TxGiLZf 2eNE1rNFHKC1g/yfBo6cjNgMrvRFYM0HcXEyAzkeMoNA7u/I9ixGWZ7blUtu/AuLmvQzKh8DOkGpw +EfTmnNJxmOT5YX6m26PiDKrhY6NtSkgI0hwkcYhqs+z4VJHlJw1Aaavw64BGfJo8ZVLHLTBvEs/J +dQYD9WQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFD7V-00022x-LG; Sat, 13 Apr 2019 07:30:37 +0000 Received: from www.osadl.org ([2001:a60:9266:ffff:62:245:132:105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFD7O-0001vH-8K for linux-arm-kernel@lists.infradead.org; Sat, 13 Apr 2019 07:30:33 +0000 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x3D7Sohf010572; Sat, 13 Apr 2019 09:29:12 +0200 From: Nicholas Mc Guire To: Russell King Subject: [PATCH 4/4] ARM: imx legacy: add an SPDX license identifier Date: Sat, 13 Apr 2019 09:23:33 +0200 Message-Id: <1555140213-1081-5-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1555140213-1081-1-git-send-email-hofrat@osadl.org> References: <1555140213-1081-1-git-send-email-hofrat@osadl.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190413_003030_805469_CE1D7C36 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mike Rapoport , Tony Lindgren , Shawn Guo , Sascha Hauer , Janusz Krzysztofik , linux-kernel@vger.kernel.org, Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Nicholas Mc Guire , Fabio Estevam , Linus Walleij , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The header clearly identifies this code as GPL V2 or later - so pop in the SPDX license identifier. Signed-off-by: Nicholas Mc Guire --- arch/arm/mach-imx/mach-mx27ads.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index c83fdd3..3f68972 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2000 Deep Blue Solutions Ltd * Copyright (C) 2002 Shane Nay (shane@minirl.com)