wwan: core: Avoid returning NULL from wwan_create_dev()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 11 Aug 2021 12:48:45 +0000 (15:48 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Aug 2021 16:53:02 +0000 (09:53 -0700)
commitd9d5b8961284b0051726e0fcda91d1e297e087f5
tree986a08a3f91835c25638b3dc4d99f8e4b64b2360
parent700fa08da43edb0af3e6a513f0255443e96088e8
wwan: core: Avoid returning NULL from wwan_create_dev()

Make wwan_create_dev() to return either valid or error pointer,
In some cases it may return NULL. Prevent this by converting
it to the respective error pointer.

Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/20210811124845.10955-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/wwan_core.c