Re: [PATCH 3/3] ASoC: amd: fix for variable set but not used warning

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

 



This code is ok. The machine driver should still function well without gpio.

if (IS_ERR(gpio_pa)) {
        gpiod_put(gpio_pa);
        put_device(codec_dev);
        return dev_err_probe(card->dev, PTR_ERR(gpio_pa),
                                            "could not get pa-enable GPIO\n");

}

You donnot need to handle null gpio_pa gpio.

if (!(IS_ERR_OR_NULL(gpio_pa))) 
	gpiod_set_value_cansleep(gpio_pa, true);



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux