From 735dd97b1b20e777d059c7b389fe9d70cd3f80c7 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Tue, 20 Feb 2007 09:04:34 +0100 Subject: [PATCH 1_4] Merge common get_dev() routines for block devices Each of the filesystem drivers duplicate the get_dev routine. This change merges them into a single function in part.c Signed-off-by: Grant Likely --- common/cmd_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/cmd_scsi.c') diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index cc08743d5d..b17bebbacf 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -194,7 +194,7 @@ void scsi_init(void) block_dev_desc_t * scsi_get_dev(int dev) { - return((block_dev_desc_t *)&scsi_dev_desc[dev]); + return (dev < CFG_SCSI_MAX_DEVICE) ? &scsi_dev_desc[dev] : NULL; } -- cgit