]> git.baikalelectronics.ru Git - kernel.git/commit
Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
authorDexuan Cui <decui@microsoft.com>
Thu, 13 Dec 2018 16:35:43 +0000 (16:35 +0000)
committerSasha Levin <sashal@kernel.org>
Thu, 13 Dec 2018 19:58:27 +0000 (14:58 -0500)
commit7c4b4a9a5ead8aaa3ff29e0a94dd5e8f77e9e6af
tree0e5d0b7ec288a6c7b6d4e245a07bb126612fdbf4
parentfccdf472694b97a370852f97c4087bc87c7c8b1f
Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels

Before 331a6c8552f9, we returned zeros for unopened channels.
With 331a6c8552f9, we started to return random on-stack values.

We'd better return -EINVAL instead.

Fixes: 331a6c8552f9 ("hv: move ringbuffer bus attributes to dev_groups")
Cc: stable@vger.kernel.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hv/vmbus_drv.c