Re: [PATCH] NVMe: Fix error handling of class_create("nvme")

2015-03-16 Thread Keith Busch
On Fri, 6 Mar 2015, Alexey Khoroshilov wrote: class_create() returns ERR_PTR on failure, so IS_ERR() should be used instead of check for NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Thanks for the fix. Acked-by: Keith Busch -- To

Re: [PATCH] NVMe: Fix error handling of class_create(nvme)

2015-03-16 Thread Keith Busch
On Fri, 6 Mar 2015, Alexey Khoroshilov wrote: class_create() returns ERR_PTR on failure, so IS_ERR() should be used instead of check for NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru Thanks for the fix. Acked-by:

Re: [PATCH] NVMe: Fix error handling of class_create("nvme")

2015-03-10 Thread Matthew Wilcox
On Tue, Mar 10, 2015 at 12:18:22PM -0700, J Freyensee wrote: > Looking at IS_ERR(), it uses IS_ERR_VALUE() which uses unlikely(), which > from what I understand is a compiler hint that means "this error is > unlikely to happen". > > Well, is this error unlikely to happen? Looks like the error

Re: [PATCH] NVMe: Fix error handling of class_create("nvme")

2015-03-10 Thread J Freyensee
On Sat, 2015-03-07 at 01:43 +0300, Alexey Khoroshilov wrote: > class_create() returns ERR_PTR on failure, > so IS_ERR() should be used instead of check for NULL. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov > --- >

Re: [PATCH] NVMe: Fix error handling of class_create(nvme)

2015-03-10 Thread J Freyensee
On Sat, 2015-03-07 at 01:43 +0300, Alexey Khoroshilov wrote: class_create() returns ERR_PTR on failure, so IS_ERR() should be used instead of check for NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru ---

Re: [PATCH] NVMe: Fix error handling of class_create(nvme)

2015-03-10 Thread Matthew Wilcox
On Tue, Mar 10, 2015 at 12:18:22PM -0700, J Freyensee wrote: Looking at IS_ERR(), it uses IS_ERR_VALUE() which uses unlikely(), which from what I understand is a compiler hint that means this error is unlikely to happen. Well, is this error unlikely to happen? Looks like the error could be

[PATCH] NVMe: Fix error handling of class_create("nvme")

2015-03-06 Thread Alexey Khoroshilov
class_create() returns ERR_PTR on failure, so IS_ERR() should be used instead of check for NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/block/nvme-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] NVMe: Fix error handling of class_create(nvme)

2015-03-06 Thread Alexey Khoroshilov
class_create() returns ERR_PTR on failure, so IS_ERR() should be used instead of check for NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru --- drivers/block/nvme-core.c | 4 +++- 1 file changed, 3 insertions(+), 1