Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1564196
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/5] s390/pci: Return directly after a failed clp_alloc_block() in clp_normal_command() |
| Date | 2017-01-21 19:20 +0100 |
| Message-ID | <t28qB-7cs-1@gated-at.bofh.it> (permalink) |
| References | <t28gW-79j-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Sat, 21 Jan 2017 17:56:40 +0100 * Return directly after a call of the function "clp_alloc_block" failed here. * Delete the jump label "out" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- arch/s390/pci/pci_clp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index 4f5a1bf3b14b..28e13fa7a79c 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c @@ -517,10 +517,9 @@ static int clp_normal_command(struct clp_req *req) if (req->lps != 0 && req->lps != 2) return -EINVAL; - rc = -ENOMEM; lpcb = clp_alloc_block(GFP_KERNEL); if (!lpcb) - goto out; + return -ENOMEM; rc = -EFAULT; uptr = (void __force __user *)(unsigned long) req->data_p; @@ -550,7 +549,6 @@ static int clp_normal_command(struct clp_req *req) out_free: clp_free_block(lpcb); -out: return rc; } -- 2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] s390/pci: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-21 19:10 +0100
[PATCH 2/5] s390/pci: Return directly after a failed clp_alloc_block() in clp_normal_command() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-21 19:20 +0100
[PATCH 5/5] s390/pci: Move two assignments for the variable "ret" in get_pfn() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-21 19:20 +0100
[PATCH 4/5] s390/pci: Move an assignment for the variable "ret" in s390_pci_mmio_write() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-21 19:20 +0100
Re: [PATCH 4/5] s390/pci: Move an assignment for the variable "ret" in s390_pci_mmio_write() Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-23 10:00 +0100
[PATCH 1/5] s390/pci: Return directly after a failed parameter validation in clp_normal_command() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-21 19:20 +0100
[PATCH 3/5] s390/pci: Move three assignments for the variable "rc" in clp_normal_command() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-21 19:20 +0100
Re: [PATCH 3/5] s390/pci: Move three assignments for the variable "rc" in clp_normal_command() Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-01-22 09:00 +0100
Re: [PATCH 0/5] s390/pci: Fine-tuning for three function implementations Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-23 10:00 +0100
csiph-web