Re: [PATCH v3 4/4] HID: touchscreen: Add initial support for Himax HID-over-SPI

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

 



On 17/10/2023 11:19, Tylor Yang wrote:

...

> +
> +#if defined(CONFIG_FB)
> +int fb_notifier_callback(struct notifier_block *self,
> +			 unsigned long event, void *data)
> +{
> +	const struct fb_event *evdata = data;
> +	int *blank;
> +	struct himax_ts_data *ts =
> +	    container_of(self, struct himax_ts_data, fb_notif);
> +
> +	I("entered");
> +
> +	if (!ts) {
> +		E("ts is NULL");
> +		return -ECANCELED;
> +	}

There are so many wrong things with this.... First, tell me, how
container of valid pointer can be NULL?

Second, this is not Linux coding style.


Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux