Notice that mgr = to_fpga_manager(dev); expands to:
mgr = container_of(dev, struct fpga_manager, dev);
and container_of is never null, so this null check is
unnecessary.
Addresses-Coverity-ID:
1397916
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct fpga_manager *mgr;
mgr = to_fpga_manager(dev);
- if (!mgr)
- goto err_dev;
if (!try_module_get(dev->parent->driver->owner))
goto err_dev;