Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3072310imm; Sun, 10 Jun 2018 07:58:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLPMyBoeUDLehoy2NuohereiJlQXNR2cBx5xg1vUuEwSf4u9dvFNaNElWR/8F7vLaG3pouV X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr14660370plb.273.1528642698008; Sun, 10 Jun 2018 07:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528642697; cv=none; d=google.com; s=arc-20160816; b=OGkmVVqy/Av2ciR7lreeVP5p3ZV9Za3strowqKkZSRbJtzMvEc5Fb6X1rC+QQDEaiD wpRfnMEfWwV+nY0rHaGGuPrET1PTn6sHW0BkSyfVVHY+28qy961hhL52EaaNgevqzKcm 5LzSUVs99kdjmqAJw9ykgkGCVbduu2lllQ+ckwGXxp+z2ibXcgjndwITSzk/Jt/d2gfU phV8LZ9JbecfPyc/Q3hJevDX03AswV6p9O6B2dqr7AJJk8kXZIyjnunejIYd/rhqESmG 0YijnGvP9NI3r7zXW/H/DblE4iFuA4/CdOzJcBkAwjxSUjwY+cZQzEEi2ECVWeVFtRmm CjuA== 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=HiWwLvVdnlLnUEJIbmx+GGLaPjlhq59DoMvmyPJECTQ=; b=eC11tY1U6uM1Q/Y0Y7xcET19lNA9UWpLIRAcUQ5P0XDT++Djp9GjgibSO3YxmiJV5a 0xaChIw28XhLo0F615vK2h7ew8lmoe6J8GQPIFDwodIe9+lNGaHeUHyjlks6XRZRP7pk SBkmqYv0QLzANLKHaPSJDhwMEZLpHYzfv16OzzTn55b5mqr+cpFGn0//+F46c01XggdA 0QsZ5wKd0081wmCPSJ6oQMW3Dyg3csdi410AJac8eVcHeYJXHnWCxDn3zcMNkeyDQXhW leGZMUPc53vBzTMnmsu2BvWopT05CeLWZuzlS3ldHe3BnKj/Q7V9qMuzQCoAh1a40ZsB BHUA== 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 q6-v6si26702837pls.21.2018.06.10.07.58.03; Sun, 10 Jun 2018 07:58:17 -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 S1753524AbeFJO4V (ORCPT + 99 others); Sun, 10 Jun 2018 10:56:21 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21892 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751254AbeFJO4U (ORCPT ); Sun, 10 Jun 2018 10:56:20 -0400 X-IronPort-AV: E=Sophos;i="5.49,498,1520895600"; d="scan'208";a="331181270" 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: Sudip Mukherjee Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] parport: sunbpp: fix error return code Date: Sun, 10 Jun 2018 16:24:14 +0200 Message-Id: <1528640655-18948-2-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. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/parport/parport_sunbpp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 01cf1c1..8de3295 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c @@ -286,12 +286,16 @@ static int bpp_probe(struct platform_device *op) ops = kmemdup(&parport_sunbpp_ops, sizeof(struct parport_operations), GFP_KERNEL); - if (!ops) + if (!ops) { + err = -ENOMEM; goto out_unmap; + } dprintk(("register_port\n")); - if (!(p = parport_register_port((unsigned long)base, irq, dma, ops))) + if (!(p = parport_register_port((unsigned long)base, irq, dma, ops))) { + err = -ENOMEM; goto out_free_ops; + } p->size = size; p->dev = &op->dev;