Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp293684ybz; Tue, 28 Apr 2020 23:54:02 -0700 (PDT) X-Google-Smtp-Source: APiQypKEwqXLhwtR+UYKCe1aXjxPJ27o2+BUf7I7sEmdQIacST8i1DEgu5zOMrmotS4YsWkrd1gU X-Received: by 2002:a17:907:2107:: with SMTP id qn7mr1291811ejb.316.1588143242609; Tue, 28 Apr 2020 23:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588143242; cv=none; d=google.com; s=arc-20160816; b=sjTQcmpwia77iVCvCZZyFUV9krtJQ4jNqgXCH3LS5wkuxpw4DciuE/goZ/eym5lpTY AyCltuuA2R7VEx4a2YuSD//11r25Twt8vK/QC7XCPEFcYDGPNCRtn8h0rEsBYPMhMiFO 4CcKNOnChT6Mkk/wIOsTk2+CQejW9W2NmLMJ6K0B1ic5tYvmmiMa7qN/efz6ux00UhKu MI0D0zIr52FwbFQRdGA0mNyxZB2I1Fq6YVZ1nu2qG+dJmVPDYalM0IFoHpa009K1dony EnA8We9P6ZZzlwtDuX4lM3QLH1vd8ljVwWUDgzxnddzmns9tT0shBsEG4aHh8a7oEFir /ULw== 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 :message-id:date:subject:cc:to:from; bh=brjZSCnY44MlfUyBir4nd0Zke61yiAR3fbxrBEW4GaQ=; b=yB26eMQGaBOK20nTl1D5q9iQMD2oHCno5YGG0dBtt9Cz3rY+jVhdHQnwjkhU7jQVDs yyPaHRen66AbeQek0NG9/i3IjPIQS+iybnWcvmIkl02gJ25SIKX1YyLu+GFnBu7hX0rN RKp2Vr3kMTzRDImr/JtBIdtCEVenspJLGAFHdPlb7wpC4i3yeHg8uWDTY6qK7J2/jbzv nnrEMIgSUxqmP9/JHyRFVxtWY5U/a86VyxMqMKMHJiljD2Nrf7aAnsZ+8y0FXDTPmrwh V+QW+BWUtvxVjdMJCkZg1e7Zv9itWH23qDgJ+ZlNcaR0vSHb1Fd367B070fphDCkq8MR 1eRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si2918325edr.273.2020.04.28.23.53.39; Tue, 28 Apr 2020 23:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726662AbgD2GwP (ORCPT + 99 others); Wed, 29 Apr 2020 02:52:15 -0400 Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:41366 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726508AbgD2GwP (ORCPT ); Wed, 29 Apr 2020 02:52:15 -0400 Received: from localhost.localdomain ([92.148.159.11]) by mwinf5d18 with ME id YWsB2200G0F2omL03WsBHc; Wed, 29 Apr 2020 08:52:13 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 29 Apr 2020 08:52:13 +0200 X-ME-IP: 92.148.159.11 From: Christophe JAILLET To: richard.gong@linux.intel.com, gregkh@linuxfoundation.org, atull@kernel.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 0/4 v2] firmware: stratix10-svc: Fix some error handling code Date: Wed, 29 Apr 2020 08:52:01 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This serie was previously sent as a single patch. After a comment from Dan Carpenter about an error handling path that could be improved, I've looked deeper at the code and found other issues. The previous patch corresponds to patch 3/4 in this serie. This v2 takes Dan's comment into account and fix another resource leak. Patch 1/4: svc_create_memory_pool returns an error code on error, not NULL Patch 2/4: undo a memremap on error path and remove funtion Patch 3/4: improve error handling in the probe function Patch 4/4: unrelated clean-up Christophe JAILLET (4): firmware: stratix10-svc: Fix genpool creation error handling firmware: stratix10-svc: Unmap some previously memremap'ed memory firmware: stratix10-svc: Fix some error handling paths in 'stratix10_svc_drv_probe()' firmware: stratix10-svc: Slighly simplify call drivers/firmware/stratix10-svc.c | 42 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 17 deletions(-) -- 2.25.1