Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3071301imm; Sun, 10 Jun 2018 07:57:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJN2hgNN0MxMwXtn6INcD2i+rSclhF6Lf2Jvx4ypoWd8SnnGq+1mAKRQlzj22SiG1pLeeZX X-Received: by 2002:a17:902:a703:: with SMTP id w3-v6mr14814587plq.111.1528642622099; Sun, 10 Jun 2018 07:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528642622; cv=none; d=google.com; s=arc-20160816; b=xCLJlG1N2Gsw3yMIQ9F/tY8PbN0uOku3Hf/Mmpa3zjIfAlwbzr+XDQJv3zj+i6dXi2 jlCMlqOBILAAZx11YKYMplT+0J8TrpFZ6drUFn+CJtsKz4+rNHDY+41pldxzDZnlrvXo pZdf3xy9XlVExTsrpfPbmtFWkjBbfuWc2f7sQo+RW5El1+AzGnc8UE7AFXJ8MfSfHycJ RV5JB1Zz/slEqNBUVaq5Ij3J4EWgkMKn3PT2coTd7DxPZed5XRAoGD8z6IUuzyqCV8A/ kOfCYeSfnNzHqvMY6Sjs3J9x5+BETH5x0MZKTbTqtkMUnYJSzDJj8gQa695TYkTQRG9g 2aBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=I5y8URqmAJEomC3nJvUl8Gh9kdPOdu9rQ8eoX+8k+sM=; b=gOEr77X1JGP/HF2e31NkztB+5lBwzXcVWOc+d1pvwcHp7FbP+FLx0FlHYaSzNzMsv4 VmyT3RVBx5weONc30oL6XbdEN3IFxgZljyQllHBRLVJ45c5XXf9mBpb1RTwXRG1Mmt+5 XLUQi1c/b5vnkPcZ1f0gWPcJGB8tH5TZQrSf80eHJgHfNZOIRA8qC8juiUReX0vLR8TI NKOlMh58hDTo1KP76GmfP/hNpuXbq14DnNw1E6ADE/plvEvMNj1716Ad+eHF3ESjUUHs 6phA2p6iPaheVJRmUSYoG9qEwZ2ZLyOx0alRo1ib8ezduPPGJAHztBo5kjIUg2GjzS+B xVAw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si23069844pgd.653.2018.06.10.07.56.47; Sun, 10 Jun 2018 07:57:02 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753580AbeFJO4Y (ORCPT + 99 others); Sun, 10 Jun 2018 10:56:24 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:44222 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbeFJO4W (ORCPT ); Sun, 10 Jun 2018 10:56:22 -0400 X-IronPort-AV: E=Sophos;i="5.49,498,1520895600"; d="scan'208";a="331181271" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 10 Jun 2018 16:56:19 +0200 From: Julia Lawall To: Daniel Lezcano Cc: kernel-janitors@vger.kernel.org, Thomas Gleixner , Maxime Coquelin , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] clocksource/drivers/stm32: fix error return code Date: Sun, 10 Jun 2018 16:24:15 +0200 Message-Id: <1528640655-18948-3-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return an error code on failure. Problem found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clocksource/timer-stm32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-stm32.c b/drivers/clocksource/timer-stm32.c index e5cdc3a..2717f88 100644 --- a/drivers/clocksource/timer-stm32.c +++ b/drivers/clocksource/timer-stm32.c @@ -304,8 +304,10 @@ static int __init stm32_timer_init(struct device_node *node) to->private_data = kzalloc(sizeof(struct stm32_timer_private), GFP_KERNEL); - if (!to->private_data) + if (!to->private_data) { + ret = -ENOMEM; goto deinit; + } rstc = of_reset_control_get(node, NULL); if (!IS_ERR(rstc)) {