lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 4/4] HID: touchscreen: Add initial support for Himax HID-over-SPI
From
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

\
 
 \ /
  Last update: 2023-10-17 19:04    [W:0.137 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site