Messages in this thread Patch in this message | | | From | Jingoo Han <> | Subject | [PATCH 03/10] rtc: rtc-ds1390: Remove unnecessary OOM messages | Date | Fri, 07 Feb 2014 17:03:49 +0900 |
| |
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> --- drivers/rtc/rtc-ds1390.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index be9d8c0..e67bfcb 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c @@ -132,10 +132,9 @@ static int ds1390_probe(struct spi_device *spi) spi_setup(spi); chip = devm_kzalloc(&spi->dev, sizeof(*chip), GFP_KERNEL); - if (!chip) { - dev_err(&spi->dev, "unable to allocate device memory\n"); + if (!chip) return -ENOMEM; - } + spi_set_drvdata(spi, chip); res = ds1390_get_reg(&spi->dev, DS1390_REG_SECONDS, &tmp); -- 1.7.10.4
| |