net: wwan: core: Return poll error in case of port removal
authorLoic Poulain <loic.poulain@linaro.org>
Thu, 22 Apr 2021 14:06:01 +0000 (16:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Apr 2021 20:26:02 +0000 (13:26 -0700)
commit57e222475545f457ecf4833db31f156e8b7674c7
tree639a107519bfbe03b9ce987e7fc9e479f1f4cab1
parenta9b5d871abc417cf65a05a9ba50c6b81a6e427eb
net: wwan: core: Return poll error in case of port removal

Ensure that the poll system call returns proper error flags when port
is removed (nullified port ops), allowing user side to properly fail,
without further read or write.

Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem")
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/wwan_core.c