Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cx25821: Remove bad strcpy to read-only char*

The strcpy was being used to set the name of the board. Since the
destination char* was read-only and the name is set statically at
compile time; this was both wrong and redundant.

The type of char* is changed to const char* to prevent future errors.

Reported-by: Radek Masin <radek@masin.eu>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
[ Taking directly due to vacations - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ezequiel Garcia and committed by
Linus Torvalds
380e99fc 8a7298b7

+1 -4
-3
drivers/media/video/cx25821/cx25821-core.c
··· 904 904 list_add_tail(&dev->devlist, &cx25821_devlist); 905 905 mutex_unlock(&cx25821_devlist_mutex); 906 906 907 - strcpy(cx25821_boards[UNKNOWN_BOARD].name, "unknown"); 908 - strcpy(cx25821_boards[CX25821_BOARD].name, "cx25821"); 909 - 910 907 if (dev->pci->device != 0x8210) { 911 908 pr_info("%s(): Exiting. Incorrect Hardware device = 0x%02x\n", 912 909 __func__, dev->pci->device);
+1 -1
drivers/media/video/cx25821/cx25821.h
··· 187 187 }; 188 188 189 189 struct cx25821_board { 190 - char *name; 190 + const char *name; 191 191 enum port porta; 192 192 enum port portb; 193 193 enum port portc;