[bug report] tty: st-asc: switch to using devm_gpiod_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Dmitry Torokhov,

The patch 8c44f9b566a3: "tty: st-asc: switch to using
devm_gpiod_get()" from Jan 4, 2020, leads to the following
Smatch static checker warning:

	drivers/gpio/gpiolib.c:3066 gpiod_set_consumer_name()
	warn: sleeping in atomic context

drivers/gpio/gpiolib.c
    3062 int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name)
    3063 {
    3064 	VALIDATE_DESC(desc);
    3065 	if (name) {
--> 3066 		name = kstrdup_const(name, GFP_KERNEL);

asc_set_termios() <- disables preempt
-> gpiod_set_consumer_name()

    3067 		if (!name)
    3068 			return -ENOMEM;
    3069 	}
    3070 
    3071 	kfree_const(desc->label);
    3072 	desc_set_label(desc, name);
    3073 
    3074 	return 0;
    3075 }

regards,
dan carpenter



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux