Re: [RESEND PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap

2019-04-30 Thread Dan Carpenter
Please don't say RESEND, say [PATCH v2]. RESEND is for when we ignored your patch. (Maybe we made a mistake or maybe the mailing list tagged it as spam and deleted it or something). Use [PATCH v2] instead. On Fri, Apr 26, 2019 at 03:38:37PM +0800, Chengguang Xu wrote: > When allocating dynamic

[RESEND PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap

2019-04-26 Thread Chengguang Xu
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 chekcking minor range overlap will avoid false-positive warning from c

Re: [PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap

2019-04-25 Thread Greg KH
On Fri, Apr 05, 2019 at 09:53:06PM +0800, Chengguang Xu wrote: > 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

[PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap

2019-04-05 Thread Chengguang Xu
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 chekcking minor range overlap will avoid false-positive warning from c