On Wed, Jul 19, 2017 at 8:08 PM, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote: > Hmm, I did not realize that GPIO API allowed calls with NULL desc and > they would be silently accepted and return 0... Not sure if that is the > best way for the subsystem to behave, but Linus is the boss ;) That part seems fine. > Maybe check for NULL explicitly and keep warning if !NULL is passed? Not sure if this is needed. Prior to commit 22c403676dbbb7c6 ("gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled") it made sense to have the WARN_ON(1) and the comment: " /* GPIO can never have been requested */" was true. After such commit this is no longer true, so that's why IMO we should just get rid of the WARN_ON and comment. -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html