Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device-dax: fix 'passing zero to ERR_PTR()' warning
Dan Carpenter reports: The patch 7b6be84: "dax: refactor dax-fs into a generic provider of 'struct dax_device' instances" from Apr 11, 2017, leads to the following static checker warning: drivers/dax/device.c:643 devm_create_dev_dax() warn: passing zero to 'ERR_PTR' Fix the case where we inadvertently leak 0 to ERR_PTR() by setting at every error case, and make it clear that 'count' is never 0. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Dan Williams <[email protected]>
- Loading branch information