forked from mirrors/linux
		
	
				The at25 driver regressed in v5.17-rc1 due to a broken conflict
resolution: the allocation of the object was accidentally removed. Restore
it.
This was found when building under CONFIG_FORTIFY_SOURCE=y and
-Warray-bounds, which complained about strncpy() being used against an
empty object:
In function 'strncpy',
    inlined from 'at25_fw_to_chip.constprop' at drivers/misc/eeprom/at25.c:312:2:
./include/linux/fortify-string.h:48:33: warning: '__builtin_strncpy' offset [0, 9] is out of the bounds [0, 0] [-Warray-bounds]
   48 | #define __underlying_strncpy    __builtin_strncpy
      |                                 ^
./include/linux/fortify-string.h:59:16: note: in expansion of macro '__underlying_strncpy'
   59 |         return __underlying_strncpy(p, q, size);
      |                ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'at25_fram_to_chip' at drivers/misc/eeprom/at25.c:373:2,
    inlined from 'at25_probe' at drivers/misc/eeprom/at25.c:453:10:
./include/linux/fortify-string.h:48:33: warning: '__builtin_strncpy' offset [0, 9] is out of the bounds [0, 0] [-Warray-bounds]
   48 | #define __underlying_strncpy    __builtin_strncpy
      |                                 ^
./include/linux/fortify-string.h:59:16: note: in expansion of macro '__underlying_strncpy'
   59 |         return __underlying_strncpy(p, q, size);
      |                ^~~~~~~~~~~~~~~~~~~~
Link: https://lore.kernel.org/lkml/CAHp75VdqK7h63fz-cPaQ2MGaVdaR2f1Fb5kKCZidUG3RwLsAVA@mail.gmail.com/
Fixes: 
		
	
					 | 
			||
|---|---|---|
| .. | ||
| altera-stapl | ||
| bcm-vk | ||
| c2port | ||
| cardreader | ||
| cb710 | ||
| cxl | ||
| echo | ||
| eeprom | ||
| genwqe | ||
| habanalabs | ||
| ibmasm | ||
| lis3lv02d | ||
| lkdtm | ||
| mei | ||
| ocxl | ||
| pvpanic | ||
| sgi-gru | ||
| sgi-xp | ||
| ti-st | ||
| uacce | ||
| vmw_vmci | ||
| ad525x_dpot-i2c.c | ||
| ad525x_dpot-spi.c | ||
| ad525x_dpot.c | ||
| ad525x_dpot.h | ||
| apds990x.c | ||
| apds9802als.c | ||
| atmel-ssc.c | ||
| bh1770glc.c | ||
| cs5535-mfgpt.c | ||
| ds1682.c | ||
| dummy-irq.c | ||
| dw-xdata-pcie.c | ||
| enclosure.c | ||
| fastrpc.c | ||
| gehc-achc.c | ||
| hi6421v600-irq.c | ||
| hisi_hikey_usb.c | ||
| hmc6352.c | ||
| hpilo.c | ||
| hpilo.h | ||
| ibmvmc.c | ||
| ibmvmc.h | ||
| ics932s401.c | ||
| isl29003.c | ||
| isl29020.c | ||
| Kconfig | ||
| kgdbts.c | ||
| lattice-ecp3-config.c | ||
| Makefile | ||
| pch_phub.c | ||
| pci_endpoint_test.c | ||
| phantom.c | ||
| qcom-coincell.c | ||
| sram-exec.c | ||
| sram.c | ||
| sram.h | ||
| tifm_7xx1.c | ||
| tifm_core.c | ||
| tsl2550.c | ||
| vmw_balloon.c | ||
| xilinx_sdfec.c | ||