Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2512139imm; Mon, 24 Sep 2018 05:43:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV631T3kJPkBkHb5VwaTjRS93VpWAawjzWo8NG4TzdUVgFF0Rra03h13ZClhVxkEAfgGgqzqI X-Received: by 2002:a63:5605:: with SMTP id k5-v6mr1118071pgb.189.1537793000886; Mon, 24 Sep 2018 05:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537793000; cv=none; d=google.com; s=arc-20160816; b=o0Bp0HHJTCpgEvx92LInyFDYeECcWycfmzuKb2oTc+fmTgRFuVTL3CzEPNDLGaK+e7 7GciV70if7GgAs/v3ouZSxn4kNSe9Si9K/WOqjcfnZ2m7C7W+G4ayaTkoJybg4NWFc6o ORX9WEqNIYIFFVda7Zeg+N/5R08/EaeBjUKC5Ay0TPCHzfMqkfk3BN20Qezzdi6g+okB tkq+dSJWBrNXz200Z5u4JLnjPZIIS6gHqRB0UwBi/V3luS3g5pwwsWBrQO8uZLT646eD qzqDno9RS2hL8eFnb36zYtWZFlVCkiVSJxlgYTymLEIemwKsAfI6TeG5QxaWENK0mZC7 WPDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=n2wkk5XPC67jvIUjHlzHBqr9ehDBxAXMb9bSYMZb2Pk=; b=jEwiU97Vt1YPeqZFLRkGRaYrimmljOtimnsy6CpunJC1dMzpd8tz8TNHI3dtTdHCgq lAq8jPSON3k3EBNOCa4mslDG3UnoyuGhBioKlWnTlLzKnWgImNm+9JLlVICT1jdnHu5o xUAs9LJbiCmMRi3acagsBlsneO0jZd+W42J23Js5kGxvji8vXXCZ8mldPfAAppnCaJJ5 kSgBxrlPrmtjdcFaMnp0t84WnbZhCan+RxQpUgc6RLfaSfX57iJpu97BSQ6L1Qekmo3T +TZTMiYPjC+Ipsz6Ffuv5wdyyvVoMApRdEcHcfLirHRyxJwgntYQY8RlFllNqDMw9aWO RVGQ== 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 bh1-v6si33675812plb.190.2018.09.24.05.43.05; Mon, 24 Sep 2018 05:43:20 -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 S2388911AbeIXSoP (ORCPT + 99 others); Mon, 24 Sep 2018 14:44:15 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59298 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387712AbeIXSoO (ORCPT ); Mon, 24 Sep 2018 14:44:14 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E32F01099; Mon, 24 Sep 2018 12:42:15 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julia Lawall , Sudip Mukherjee , Sasha Levin Subject: [PATCH 4.18 188/235] parport: sunbpp: fix error return code Date: Mon, 24 Sep 2018 13:52:54 +0200 Message-Id: <20180924113123.277076465@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Julia Lawall [ Upstream commit faa1a47388b33623e4d504c23569188907b039a0 ] Return an error code on failure. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/parport/parport_sunbpp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c @@ -286,12 +286,16 @@ static int bpp_probe(struct platform_dev 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;