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=-9.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT 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 ED0E3C433E0 for ; Fri, 29 May 2020 09:46:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF5722074B for ; Fri, 29 May 2020 09:46:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D5vBc5uz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF5722074B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=H2984fCrVZereAT25N+rGr/eiU5/FLifJUsOP7RJD4M=; b=D5vBc5uzfQcEVO VDDNzfO3zE9XGvKEQdj1tUrt3oyGHQcG7H+iqkt8oXxJgm9lXqFsnGyjLZlS04K+V2Z+IJ8Igaize CMkVyjxfzJAvUYUZPXUHsoLFh3E2Anr5QxMGaQDlPuMDWDitty9Y5WEIcs1v9U1vxGkiNUzM79nyh /aEKxcZ50rrl4Y7JGkSPaHUfXmh2xo8+oYhEv2fTe8QfHXcBwLppdDFiqZvQ9Las8aKZdbRJ1ALDF cr+s/ojkrr3Ydli2gduAfN9w9C7LHvWWVd0oAZsVN6tXGylnGmdbQ3ocJ4YF8vjvp7ZjAKtJHc496 YS8rp7fCxPr81ILCbaDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jebaT-0007Eg-Db; Fri, 29 May 2020 09:46:01 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jebaP-0007Dv-Sl for linux-arm-kernel@lists.infradead.org; Fri, 29 May 2020 09:45:59 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.3391108|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.00564441-0.000591423-0.993764; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03305; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=10; RT=10; SR=0; TI=SMTPD_---.HfKukDl_1590745546; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.HfKukDl_1590745546) by smtp.aliyun-inc.com(10.147.41.137); Fri, 29 May 2020 17:45:51 +0800 From: Frank Lee To: wim@linux-watchdog.org, linux@roeck-us.net, mripard@kernel.org, wens@csie.org Subject: [PATCH] watchdog: sunxi_wdt: fix improper error exit code Date: Fri, 29 May 2020 17:45:14 +0800 Message-Id: <20200529094514.26374-1-frank@allwinnertech.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200529_024558_082002_FD8F7340 X-CRM114-Status: UNSURE ( 8.22 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-watchdog@vger.kernel.org, tiny.windzz@gmail.com, linux-kernel@vger.kernel.org, Frank Lee , wuyan@allwinnertech.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Martin Wu sunxi_wdt_probe() should return -ENOMEM when devm_kzalloc() fails. Signed-off-by: Martin Wu Signed-off-by: Frank Lee --- drivers/watchdog/sunxi_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c index 5f05a45ac187..b50757882a98 100644 --- a/drivers/watchdog/sunxi_wdt.c +++ b/drivers/watchdog/sunxi_wdt.c @@ -235,7 +235,7 @@ static int sunxi_wdt_probe(struct platform_device *pdev) sunxi_wdt = devm_kzalloc(dev, sizeof(*sunxi_wdt), GFP_KERNEL); if (!sunxi_wdt) - return -EINVAL; + return -ENOMEM; sunxi_wdt->wdt_regs = of_device_get_match_data(dev); if (!sunxi_wdt->wdt_regs) -- 2.24.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel