Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584150 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2017-02-19 15:20 +0100 |
| Last post | 2017-02-20 12:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] lightnvm: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-02-19 15:20 +0100
Re: [PATCH] lightnvm: Fix error handling Matias Bjørling <mb@lightnvm.io> - 2017-02-20 12:20 +0100
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2017-02-19 15:20 +0100 |
| Subject | [PATCH] lightnvm: Fix error handling |
| Message-ID | <tcAvf-8oP-3@gated-at.bofh.it> |
According to error handling in this function, it is likely that going to
'out' was expected here.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/lightnvm/rrpc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index e00b1d7b976f..e68efbcf1188 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -1275,8 +1275,10 @@ static int rrpc_bb_discovery(struct nvm_tgt_dev *dev, struct rrpc_lun *rlun)
}
nr_blks = nvm_bb_tbl_fold(dev->parent, blks, nr_blks);
- if (nr_blks < 0)
- return nr_blks;
+ if (nr_blks < 0) {
+ ret = nr_blks;
+ goto out;
+ }
for (i = 0; i < nr_blks; i++) {
if (blks[i] == NVM_BLK_T_FREE)
--
2.9.3
[toc] | [next] | [standalone]
| From | Matias Bjørling <mb@lightnvm.io> |
|---|---|
| Date | 2017-02-20 12:20 +0100 |
| Message-ID | <tcUaC-3XL-21@gated-at.bofh.it> |
| In reply to | #1584150 |
On 02/19/2017 03:09 PM, Christophe JAILLET wrote:
> According to error handling in this function, it is likely that going to
> 'out' was expected here.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/lightnvm/rrpc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index e00b1d7b976f..e68efbcf1188 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -1275,8 +1275,10 @@ static int rrpc_bb_discovery(struct nvm_tgt_dev *dev, struct rrpc_lun *rlun)
> }
>
> nr_blks = nvm_bb_tbl_fold(dev->parent, blks, nr_blks);
> - if (nr_blks < 0)
> - return nr_blks;
> + if (nr_blks < 0) {
> + ret = nr_blks;
> + goto out;
> + }
>
> for (i = 0; i < nr_blks; i++) {
> if (blks[i] == NVM_BLK_T_FREE)
>
Thanks Christophe. Applied for 4.12.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web