diff options
| author | Chengguang Xu <[email protected]> | 2019-05-02 12:15:05 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-05-24 18:50:36 +0000 |
| commit | 7ef0b1524417743e6861490420225affe451486b (patch) | |
| tree | cd11afb441a7cd2abc48bc1a0860482a540e4abd /drivers/firmware/google/framebuffer-coreboot.c | |
| parent | counter: 104-quad-8: Make quad8_ops static (diff) | |
| download | kernel-7ef0b1524417743e6861490420225affe451486b.tar.gz kernel-7ef0b1524417743e6861490420225affe451486b.zip | |
chardev: set variable ret to -EBUSY before checking minor range overlap
When allocating dynamic major, the minor range overlap check
in __register_chrdev_region() will not fail, so actually
there is no real case to passing non negative error code to
caller. However, set variable ret to -EBUSY before checking
minor range overlap will avoid false-positive warning from
code analyzing tool(like Smatch) and also make the code more
easy to understand.
Suggested-by: Dan Carpenter <[email protected]>
Signed-off-by: Chengguang Xu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/firmware/google/framebuffer-coreboot.c')
0 files changed, 0 insertions, 0 deletions
