All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-01-16 10:40 ` Dan Carpenter
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Carpenter @ 2018-01-16 10:40 UTC (permalink / raw)
  To: K. Y. Srinivasan, Cathy Avery
  Cc: Haiyang Zhang, Stephen Hemminger, James E.J. Bottomley,
	Martin K. Petersen, devel, linux-scsi, kernel-janitors

We should set the error code if fc_remote_port_add() fails.

Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 3b3d1d050cac..40fc7a590e81 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1834,8 +1834,10 @@ static int storvsc_probe(struct hv_device *device,
 		fc_host_node_name(host) = stor_device->node_name;
 		fc_host_port_name(host) = stor_device->port_name;
 		stor_device->rport = fc_remote_port_add(host, 0, &ids);
-		if (!stor_device->rport)
+		if (!stor_device->rport) {
+			ret = -ENOMEM;
 			goto err_out4;
+		}
 	}
 #endif
 	return 0;

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-01-16 10:40 ` Dan Carpenter
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Carpenter @ 2018-01-16 10:40 UTC (permalink / raw)
  To: K. Y. Srinivasan, Cathy Avery
  Cc: Haiyang Zhang, Stephen Hemminger, James E.J. Bottomley,
	Martin K. Petersen, devel, linux-scsi, kernel-janitors

We should set the error code if fc_remote_port_add() fails.

Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 3b3d1d050cac..40fc7a590e81 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1834,8 +1834,10 @@ static int storvsc_probe(struct hv_device *device,
 		fc_host_node_name(host) = stor_device->node_name;
 		fc_host_port_name(host) = stor_device->port_name;
 		stor_device->rport = fc_remote_port_add(host, 0, &ids);
-		if (!stor_device->rport)
+		if (!stor_device->rport) {
+			ret = -ENOMEM;
 			goto err_out4;
+		}
 	}
 #endif
 	return 0;

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
  2018-01-16 10:40 ` Dan Carpenter
@ 2018-01-16 14:36   ` Cathy Avery
  -1 siblings, 0 replies; 11+ messages in thread
From: Cathy Avery @ 2018-01-16 14:36 UTC (permalink / raw)
  To: Dan Carpenter, K. Y. Srinivasan
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	Haiyang Zhang, kernel-janitors, devel, Stephen Hemminger

On 01/16/2018 05:40 AM, Dan Carpenter wrote:
> We should set the error code if fc_remote_port_add() fails.
>
> Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 3b3d1d050cac..40fc7a590e81 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1834,8 +1834,10 @@ static int storvsc_probe(struct hv_device *device,
>   		fc_host_node_name(host) = stor_device->node_name;
>   		fc_host_port_name(host) = stor_device->port_name;
>   		stor_device->rport = fc_remote_port_add(host, 0, &ids);
> -		if (!stor_device->rport)
> +		if (!stor_device->rport) {
> +			ret = -ENOMEM;
>   			goto err_out4;
> +		}
>   	}
>   #endif
>   	return 0;

Reviewed-by: Cathy Avery <cavery@redhat.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-01-16 14:36   ` Cathy Avery
  0 siblings, 0 replies; 11+ messages in thread
From: Cathy Avery @ 2018-01-16 14:36 UTC (permalink / raw)
  To: Dan Carpenter, K. Y. Srinivasan
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	Haiyang Zhang, kernel-janitors, devel, Stephen Hemminger

On 01/16/2018 05:40 AM, Dan Carpenter wrote:
> We should set the error code if fc_remote_port_add() fails.
>
> Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 3b3d1d050cac..40fc7a590e81 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1834,8 +1834,10 @@ static int storvsc_probe(struct hv_device *device,
>   		fc_host_node_name(host) = stor_device->node_name;
>   		fc_host_port_name(host) = stor_device->port_name;
>   		stor_device->rport = fc_remote_port_add(host, 0, &ids);
> -		if (!stor_device->rport)
> +		if (!stor_device->rport) {
> +			ret = -ENOMEM;
>   			goto err_out4;
> +		}
>   	}
>   #endif
>   	return 0;

Reviewed-by: Cathy Avery <cavery@redhat.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
  2018-01-16 14:36   ` Cathy Avery
  (?)
@ 2018-01-16 15:10   ` KY Srinivasan
  -1 siblings, 0 replies; 11+ messages in thread
From: KY Srinivasan @ 2018-01-16 15:10 UTC (permalink / raw)
  To: Cathy Avery, Dan Carpenter
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	Haiyang Zhang, kernel-janitors, devel, Stephen Hemminger



> -----Original Message-----
> From: Cathy Avery [mailto:cavery@redhat.com]
> Sent: Tuesday, January 16, 2018 6:36 AM
> To: Dan Carpenter <dan.carpenter@oracle.com>; KY Srinivasan
> <kys@microsoft.com>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; James E.J. Bottomley
> <jejb@linux.vnet.ibm.com>; Martin K. Petersen
> <martin.petersen@oracle.com>; devel@linuxdriverproject.org; linux-
> scsi@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
> 
> On 01/16/2018 05:40 AM, Dan Carpenter wrote:
> > We should set the error code if fc_remote_port_add() fails.
> >
> > Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> > index 3b3d1d050cac..40fc7a590e81 100644
> > --- a/drivers/scsi/storvsc_drv.c
> > +++ b/drivers/scsi/storvsc_drv.c
> > @@ -1834,8 +1834,10 @@ static int storvsc_probe(struct hv_device
> *device,
> >   		fc_host_node_name(host) = stor_device->node_name;
> >   		fc_host_port_name(host) = stor_device->port_name;
> >   		stor_device->rport = fc_remote_port_add(host, 0, &ids);
> > -		if (!stor_device->rport)
> > +		if (!stor_device->rport) {
> > +			ret = -ENOMEM;
> >   			goto err_out4;
> > +		}
> >   	}
> >   #endif
> >   	return 0;
> 
> Reviewed-by: Cathy Avery <cavery@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
  2018-01-16 10:40 ` Dan Carpenter
@ 2018-01-17  6:18   ` Martin K. Petersen
  -1 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2018-01-17  6:18 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: K. Y. Srinivasan, Cathy Avery, Haiyang Zhang, Stephen Hemminger,
	James E.J. Bottomley, Martin K. Petersen, devel, linux-scsi,
	kernel-janitors


Dan,

> We should set the error code if fc_remote_port_add() fails.

Applied to 4.16/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-01-17  6:18   ` Martin K. Petersen
  0 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2018-01-17  6:18 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: K. Y. Srinivasan, Cathy Avery, Haiyang Zhang, Stephen Hemminger,
	James E.J. Bottomley, Martin K. Petersen, devel, linux-scsi,
	kernel-janitors


Dan,

> We should set the error code if fc_remote_port_add() fails.

Applied to 4.16/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
  2018-02-08 23:50 ` Long Li
@ 2018-02-09  8:01   ` Greg KH
  -1 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2018-02-09  8:01 UTC (permalink / raw)
  To: Long Li
  Cc: K . Y . Srinivasan, Haiyang Zhang, James E . J . Bottomley,
	devel, linux-scsi, linux-kernel, stable, Martin K . Petersen,
	Dan Carpenter

On Thu, Feb 08, 2018 at 04:50:40PM -0700, Long Li wrote:
> From: Long Li <longli@microsoft.com>

No, Dan wrote the first patch here, don't change the authorship of a
patch :(

Now fixed up by hand...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-02-09  8:01   ` Greg KH
  0 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2018-02-09  8:01 UTC (permalink / raw)
  To: Long Li
  Cc: Martin K . Petersen, linux-scsi, Haiyang Zhang,
	James E . J . Bottomley, linux-kernel, stable, devel,
	Dan Carpenter

On Thu, Feb 08, 2018 at 04:50:40PM -0700, Long Li wrote:
> From: Long Li <longli@microsoft.com>

No, Dan wrote the first patch here, don't change the authorship of a
patch :(

Now fixed up by hand...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-02-08 23:50 ` Long Li
  0 siblings, 0 replies; 11+ messages in thread
From: Long Li @ 2018-02-08 23:50 UTC (permalink / raw)
  To: K . Y . Srinivasan, Haiyang Zhang, James E . J . Bottomley,
	devel, linux-scsi, linux-kernel, stable
  Cc: Martin K . Petersen, Dan Carpenter

From: Long Li <longli@microsoft.com>

This patch backports upstream commit ca8dc694045e9aa248e9916e0f614deb0494cb3d
for 4.14-stable.

commit ca8dc694045e9aa248e9916e0f614deb0494cb3d:

We should set the error code if fc_remote_port_add() fails.

Cc: <stable@vger.kernel.org> #v4.12+
Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Cathy Avery <cavery@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/scsi/storvsc_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 5e7200f..c17ccb9 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1826,8 +1826,10 @@ static int storvsc_probe(struct hv_device *device,
 		fc_host_node_name(host) = stor_device->node_name;
 		fc_host_port_name(host) = stor_device->port_name;
 		stor_device->rport = fc_remote_port_add(host, 0, &ids);
-		if (!stor_device->rport)
+		if (!stor_device->rport) {
+			ret = -ENOMEM;
 			goto err_out3;
+		}
 	}
 #endif
 	return 0;
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] scsi: storvsc: missing error code in storvsc_probe()
@ 2018-02-08 23:50 ` Long Li
  0 siblings, 0 replies; 11+ messages in thread
From: Long Li @ 2018-02-08 23:50 UTC (permalink / raw)
  To: K . Y . Srinivasan, Haiyang Zhang, James E . J . Bottomley,
	devel, linux-scsi, linux-kernel, stable
  Cc: Long Li, Dan Carpenter, Martin K . Petersen

From: Long Li <longli@microsoft.com>

This patch backports upstream commit ca8dc694045e9aa248e9916e0f614deb0494cb3d
for 4.14-stable.

commit ca8dc694045e9aa248e9916e0f614deb0494cb3d:

We should set the error code if fc_remote_port_add() fails.

Cc: <stable@vger.kernel.org> #v4.12+
Fixes: daf0cd445a21 ("scsi: storvsc: Add support for FC rport.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Cathy Avery <cavery@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/scsi/storvsc_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 5e7200f..c17ccb9 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1826,8 +1826,10 @@ static int storvsc_probe(struct hv_device *device,
 		fc_host_node_name(host) = stor_device->node_name;
 		fc_host_port_name(host) = stor_device->port_name;
 		stor_device->rport = fc_remote_port_add(host, 0, &ids);
-		if (!stor_device->rport)
+		if (!stor_device->rport) {
+			ret = -ENOMEM;
 			goto err_out3;
+		}
 	}
 #endif
 	return 0;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-02-09  8:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 10:40 [PATCH] scsi: storvsc: missing error code in storvsc_probe() Dan Carpenter
2018-01-16 10:40 ` Dan Carpenter
2018-01-16 14:36 ` Cathy Avery
2018-01-16 14:36   ` Cathy Avery
2018-01-16 15:10   ` KY Srinivasan
2018-01-17  6:18 ` Martin K. Petersen
2018-01-17  6:18   ` Martin K. Petersen
2018-02-08 23:50 Long Li
2018-02-08 23:50 ` Long Li
2018-02-09  8:01 ` Greg KH
2018-02-09  8:01   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.