]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: scsi_devinfo: cleanly zero-pad devinfo strings
authorMartin Wilck <mwilck@suse.com>
Mon, 27 Nov 2017 22:47:35 +0000 (23:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Dec 2018 12:03:38 +0000 (13:03 +0100)
commit6ea54af90988bf869e57265723c33af623b4abec
tree357d9ed6cf221c2cdbb7cbd619427501994c7c9c
parent46466e23bc1bc262c28a020df982233c309ed958
scsi: scsi_devinfo: cleanly zero-pad devinfo strings

commit 81df022b688d43d2a3667518b2f755d384397910 upstream.

Cleanly fill memory for "vendor" and "model" with 0-bytes for the
"compatible" case rather than adding only a single 0 byte.  This
simplifies the devinfo code a a bit, and avoids mistakes in other places
of the code (not in current upstream, but we had one such mistake in the
SUSE kernel).

[mkp: applied by hand and added braces]

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_devinfo.c