lkml.org 
[lkml]   [2020]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] usb: fix empty-body warning in sysfs.c
On Sat, Apr 18, 2020 at 11:41:07AM -0700, Randy Dunlap wrote:
> +++ linux-next-20200327/drivers/usb/core/sysfs.c
> @@ -1263,7 +1263,7 @@ void usb_create_sysfs_intf_files(struct
> if (!alt->string && !(udev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
> alt->string = usb_cache_string(udev, alt->desc.iInterface);
> if (alt->string && device_create_file(&intf->dev, &dev_attr_interface))
> - ; /* We don't actually care if the function fails. */
> + do_empty(); /* We don't actually care if the function fails. */
> intf->sysfs_files_created = 1;
> }

Why not just?

+ if (alt->string)
+ device_create_file(&intf->dev, &dev_attr_interface);

\
 
 \ /
  Last update: 2020-04-18 20:44    [W:0.145 / U:3.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site