forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/media/usb/hdpvr/hdpvr-core.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Hauppauge HD PVR USB driver
34 *
45 * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)
56 * Copyright (C) 2008 Janne Grunau (j@jannau.net)
67 * Copyright (C) 2008 John Poet
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License as
10
- * published by the Free Software Foundation, version 2.
11
- *
128 */
139
1410 #include <linux/kernel.h>
....@@ -367,9 +363,9 @@
367363 }
368364
369365 client = hdpvr_register_ir_i2c(dev);
370
- if (!client) {
366
+ if (IS_ERR(client)) {
371367 v4l2_err(&dev->v4l2_dev, "i2c IR device register failed\n");
372
- retval = -ENODEV;
368
+ retval = PTR_ERR(client);
373369 goto reg_fail;
374370 }
375371 #endif