Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626651 > unrolled thread

[PATCH] scsi: osd_uld: fix mismerge

Started byArnd Bergmann <arnd@arndb.de>
First post2017-04-19 19:50 +0200
Last post2017-04-20 01:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] scsi: osd_uld: fix mismerge Arnd Bergmann <arnd@arndb.de> - 2017-04-19 19:50 +0200
    Re: [PATCH] scsi: osd_uld: fix mismerge Stephen Rothwell <sfr@canb.auug.org.au> - 2017-04-20 01:30 +0200

#1626651 — [PATCH] scsi: osd_uld: fix mismerge

FromArnd Bergmann <arnd@arndb.de>
Date2017-04-19 19:50 +0200
Subject[PATCH] scsi: osd_uld: fix mismerge
Message-ID<ty1TQ-6kT-23@gated-at.bofh.it>
A mismerge between two branches in linux-next reintroduced a warning that was
previously resolved:

drivers/scsi/osd/osd_uld.c: In function 'osd_probe':
drivers/scsi/osd/osd_uld.c:457:2: error: ignoring return value of 'scsi_device_get', declared with attribute warn_unused_result [-Werror=unused-result]

The original fix had more complex error unrolling, but as far as I
can tell, this simpler version is now sufficient.

Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value")
Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/osd/osd_uld.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index 8b9941a5687a..0e56f1eb05dc 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -454,7 +454,8 @@ static int osd_probe(struct device *dev)
 	/* hold one more reference to the scsi_device that will get released
 	 * in __release, in case a logout is happening while fs is mounted
 	 */
-	scsi_device_get(scsi_device);
+	if (scsi_device_get(scsi_device))
+		goto err_retract_minor;
 	osd_dev_init(&oud->od, scsi_device);
 
 	/* allocate a disk and set it up */
-- 
2.9.0

[toc] | [next] | [standalone]


#1626867

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-04-20 01:30 +0200
Message-ID<ty7cR-1dY-3@gated-at.bofh.it>
In reply to#1626651
Hi Arnd,

On Wed, 19 Apr 2017 19:44:01 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> A mismerge between two branches in linux-next reintroduced a warning that was
> previously resolved:
> 
> drivers/scsi/osd/osd_uld.c: In function 'osd_probe':
> drivers/scsi/osd/osd_uld.c:457:2: error: ignoring return value of 'scsi_device_get', declared with attribute warn_unused_result [-Werror=unused-result]
> 
> The original fix had more complex error unrolling, but as far as I
> can tell, this simpler version is now sufficient.
> 
> Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value")
> Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/scsi/osd/osd_uld.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
> index 8b9941a5687a..0e56f1eb05dc 100644
> --- a/drivers/scsi/osd/osd_uld.c
> +++ b/drivers/scsi/osd/osd_uld.c
> @@ -454,7 +454,8 @@ static int osd_probe(struct device *dev)
>  	/* hold one more reference to the scsi_device that will get released
>  	 * in __release, in case a logout is happening while fs is mounted
>  	 */
> -	scsi_device_get(scsi_device);
> +	if (scsi_device_get(scsi_device))
> +		goto err_retract_minor;
>  	osd_dev_init(&oud->od, scsi_device);
>  
>  	/* allocate a disk and set it up */

I will add this as a merge fix patch for the merge of the char-misc and
scsi trees today.  Someone needs to let Linus know when these trees are
merged.

-- 
Cheers,
Stephen Rothwell

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web