Skip to content

Commit a4d6e1e

Browse files
committed
fixup! gpu: drm: apple: Add DCP audio driver
Signed-off-by: Janne Grunau <[email protected]>
1 parent 1e2de68 commit a4d6e1e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/apple/audio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static int dcpaud_create_pcm(struct dcp_audio *dcpaud)
446446

447447
pcm->nonatomic = true;
448448
pcm->private_data = dcpaud;
449-
strcpy(pcm->name, card->shortname);
449+
strscpy(pcm->name, card->shortname, sizeof(pcm->name));
450450

451451
return 0;
452452
}
@@ -487,9 +487,9 @@ static void dcpaud_set_card_names(struct dcp_audio *dcpaud)
487487
{
488488
struct snd_card *card = dcpaud->card;
489489

490-
strcpy(card->driver, "apple_dcp");
491-
strcpy(card->longname, "Apple DisplayPort");
492-
strcpy(card->shortname, "Apple DisplayPort");
490+
strscpy(card->driver, "apple_dcp", sizeof(card->driver));
491+
strscpy(card->longname, "Apple DisplayPort", sizeof(card->longname));
492+
strscpy(card->shortname, "Apple DisplayPort", sizeof(card->shortname));
493493
}
494494

495495
static int dcpaud_init_snd_card(struct dcp_audio *dcpaud)

0 commit comments

Comments
 (0)