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]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux